Skip to content

Commit

Permalink
Fix DirectoryTree.path no longer reacting to new values
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Feb 26, 2024
1 parent 65c4cce commit 17ba516
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed `Sparkline` not working with data in a `deque` https://github.com/Textualize/textual/issues/3899
- Tooltips are now cleared when the related widget is no longer under them https://github.com/Textualize/textual/issues/3045
- Simplified tree-sitter highlight queries for HTML, which also seems to fix segfault issue https://github.com/Textualize/textual/pull/4195
- Fixed `DirectoryTree.path` no longer reacting to new values https://github.com/Textualize/textual/issues/4208

## [0.52.1] - 2024-02-20

Expand Down
1 change: 1 addition & 0 deletions src/textual/widgets/_directory_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ async def watch_path(self) -> None:
If the path is changed the directory tree will be repopulated using
the new value as the root.
"""
self.reset_node(self.root, str(self.path), DirEntry(self.PATH(self.path)))
await self.reload()

def process_label(self, label: TextType) -> Text:
Expand Down

0 comments on commit 17ba516

Please sign in to comment.