Skip to content
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

Tree doesn't post NodeExpanded when a node is expanded from code #2535

Closed
davep opened this issue May 10, 2023 · 2 comments · Fixed by #2536
Closed

Tree doesn't post NodeExpanded when a node is expanded from code #2535

davep opened this issue May 10, 2023 · 2 comments · Fixed by #2536
Assignees
Labels
enhancement New feature or request Task

Comments

@davep
Copy link
Contributor

davep commented May 10, 2023

Noticed while starting work on #2456, Tree will only post a NodeExpanded message when a node is expanded under user interaction. If a node is expanded from code, no message is sent. This has a knock-on effect on the DirectoryTree where it used NodeExapnded to know when it should lazy-load the content of a directory in the tree.

Correcting this is necessary to implementing #2456, but adding this as an issue in its own right as it's a fairly fundamental change to Tree (albeit not a breaking one) and worth highlighting in its own right.

This will in effect expand on the work in #1644 (and so follows on from the requirement first laid out in #1430).

@davep
Copy link
Contributor Author

davep commented May 10, 2023

Note that collapsing a node also has the same issue in respect to `Tree.NodeCollapsed.

@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant