-
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
DirectoryTree.path no longer reactive #4208
Comments
Confirmed with this: from textual import on
from textual.app import App, ComposeResult
from textual.widgets import DirectoryTree, Input
class DirTreePathIssueApp(App[None]):
def compose(self) -> ComposeResult:
yield Input()
yield DirectoryTree(".")
@on(Input.Submitted)
def new_path(self, event: Input.Submitted) -> None:
self.notify(f"Swapping to {event.value}")
self.query_one(DirectoryTree).path = event.value
if __name__ == "__main__":
DirTreePathIssueApp().run() Most likely an unintended consequence of #4123. |
davep
added a commit
to davep/textual-sandbox
that referenced
this issue
Feb 26, 2024
davep
added a commit
to davep/textual
that referenced
this issue
Feb 26, 2024
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Thank you Dave! |
Most welcome! And thanks for the heads-up! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
DirectoryTree.path
variable changing values no longer reloads the widget when it's changed. This behavior changed on the 0.49.0 release.I expected the
path
attribute to be reactive, according to thewatch_path
docs:In the below examples I set a binding on the directory tree,
.
- this action should trigger the directory tree going refreshing to the current root's parent directory:Example App
textual==0.48.2 screen recording
Screen.Recording.2024-02-25.at.8.22.04.PM.mov
textual==0.49.0 screen recording
Screen.Recording.2024-02-25.at.8.20.38.PM.mov
The text was updated successfully, but these errors were encountered: