mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #2473 from davep/fix-dir-tree-eager-path
This commit is contained in:
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed crash when creating a `DirectoryTree` starting anywhere other than `.`
|
||||
|
||||
### Changed
|
||||
|
||||
- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically https://github.com/Textualize/textual/issues/2459
|
||||
|
||||
@@ -103,7 +103,6 @@ class DirectoryTree(Tree[DirEntry]):
|
||||
classes: A space-separated list of classes, or None for no classes.
|
||||
disabled: Whether the directory tree is disabled or not.
|
||||
"""
|
||||
self.path = path
|
||||
super().__init__(
|
||||
str(path),
|
||||
data=DirEntry(Path(path)),
|
||||
@@ -112,6 +111,7 @@ class DirectoryTree(Tree[DirEntry]):
|
||||
classes=classes,
|
||||
disabled=disabled,
|
||||
)
|
||||
self.path = path
|
||||
|
||||
def reload(self) -> None:
|
||||
"""Reload the `DirectoryTree` contents."""
|
||||
|
||||
Reference in New Issue
Block a user