-
Notifications
You must be signed in to change notification settings - Fork 815
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
How to refresh DirectoryTree to see new files/folders? #4777
Comments
|
thanks, I missed that in the docs /tutorials |
No problem. Would you mind closing this if that resolves your issue? |
Closing the issue but want to remark that reload only works( at least for me) with and the docs did not indicate that to me. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Sorry I'm not sure I understand your last remark.
|
self.query(DirectoryTree).reload() does not work. Now once there is a second DirectoryTree active. but if we target one specific DirectoryTree instance --> the one with id "loading-tree": To reload all all Directory trees in the app we would now need to do a query_one on each of the DirectoryTree Widgets individually. |
I don't think |
For my particular application reactivity did not work, but refreshing all the widgets does. |
Pushing this discussion to issue as it seems critical for a lot of apps based on textual.
A method to reload/refresh the DirectoryTree Widget would be highly appreciated.
self.query(Input).refresh(layout=False, recompose=True) --> or any Widget I tried works.
self.query(DirectoryTree).refresh(layout=False, recompose=True) -> does not, but would be expected.
Discussed in #1428
Originally posted by toiletsandpaper December 22, 2022
This does't work at all:
And this is working, but seems very inefficient:
The text was updated successfully, but these errors were encountered: