-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close all folders programmatically or on files change #48
Comments
Yes. One way that you could do this is with this.setState(). There are four properties for every item within the array that must be set. Key - How the program generates the name and folder of the file. If you provide a key of "abc/def.jpg", the script will create a folder "abc" with file "def.jpg". Similarly, if you just provide "def.jpg", then no folder gets displayed on the front end, even if the URL has a folder. The JSON for the following is templated in a fashion similar to the following example. This is an array with one object, but more objects mean more links on the list.
If the files change, you've likely used the onCreateFiles, onCreateFolder, onMoveFile, or onDeleteFile hooks. I would put something like
into the change hooks that you use. (Most hooks are optional.) Failing that, I'm not certain. But that should flush the state, collapse and destroy all the folders on the frontend, and then immediately bring back the old state. |
@dguayrobotiq |
@zentrapool sorry we finally made our own solution to have more flexible behaviors |
@dguayrobotiq by any chance did you open sourced that solution? 😄 |
@ziaulrehman40 Sorry we did not |
Is there a way to close the file browser folders when its files change? Or anyway to do it programmatically?
The text was updated successfully, but these errors were encountered: