uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
295 stars 143 forks source link

Programmatically scroll to file/folder #211

Closed as14g18 closed 2 years ago

as14g18 commented 2 years ago

Hi, is there a way to scroll to a particular file or folder in the file browser component? My use case is that I want to open a certain folder by default when the component is launched. However I also want to scroll to that folder's location in the folder list. Is this possible?

dreadera commented 2 years ago

Currently there is native no way to do this, however I think you might be able to explore using the fileRenderer prop and then wrapping it with a ref to use the scrollIntoView function.

dreadera commented 2 years ago

Closing due to inactivity. If the problem still persists, please feel free to open the issue again :)