-
Notifications
You must be signed in to change notification settings - Fork 829
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] It would be beneficial to separate Tree node selection from node toggling #1433
Comments
Try |
Unfortunately that seems to stop the ability to expand a tree without the mouse (at least by default -- presumably it's possible for the developer to add their own binding). Is that by design or shall I raise an issue to this effect? |
If the dev doesn't want selecting the label to expand the node automatically, then they would need to expand it manually. Unless we have some "expand but don't select" binding. |
Aye, I'm thinking it might be an idea to split At least: playing with the permutations there right now that feels right under my fingers. |
I'm adapting some code to the new Example use case: I have a tree view tied to a hexdump. Selecting a node (single click or (It's also possible to enable a double click to toggle a node by hacking the |
Maybe fixed, or possible some other way. To investigate. |
See Textualize#1433. The idea here is that the user has an option of expanding/collapsing a non-leaf node without causing a selected event, or (with auto_expand turned off) cause a selected event without an expand/collapse event. As this will need a new binding, I've chosen the space bar as the key to toggle the expanded state.
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Currently, clicking on a
Tree
node label both selects the node and toggles its expansion state. It would be useful if node expansion was restricted (or restrictable on a per-Tree
basis) to clicks on the expansion handle (triangle), and node selection to the label only.The text was updated successfully, but these errors were encountered: