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] Provide some sort of expand/collapse_all facility for TreeNode #1430

Closed
davep opened this issue Dec 22, 2022 · 3 comments · Fixed by #1644
Closed

[Tree] Provide some sort of expand/collapse_all facility for TreeNode #1430

davep opened this issue Dec 22, 2022 · 3 comments · Fixed by #1644
Assignees
Labels
enhancement New feature or request

Comments

@davep
Copy link
Contributor

davep commented Dec 22, 2022

It's currently possible to expand a TreeNode, but that only expands the direct children. It would be useful if it had an optional parameter, or another method akin to expand_all, so that every expandable descendent node is expanded.

@davep davep added the enhancement New feature or request label Dec 22, 2022
@github-actions
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

Also collapse_all

@willmcgugan willmcgugan changed the title Consider providing some sort of expand_all facility for TreeNode [Tree] Consider providing some sort of expand_all facility for TreeNode Jan 19, 2023
@davep davep changed the title [Tree] Consider providing some sort of expand_all facility for TreeNode [Tree] Provide some sort of expand_all facility for TreeNode Jan 23, 2023
@davep davep changed the title [Tree] Provide some sort of expand_all facility for TreeNode [Tree] Provide some sort of expand/collapse_all facility for TreeNode Jan 23, 2023
davep added a commit to davep/textual that referenced this issue Jan 23, 2023
This commit moves the bulk of the work of each action into an internal
method that does everything *apart* from invalidating the tree. The idea
being that all of the expanded states get updated, all of the update counts
get updated, and then finally one single tree invalidation takes place (the
latter taking place in the public method, which calls the related internal
method).

See Textualize#1430.
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants