Cant't expand or collapse tree nodes through header, only arrow icon #3840
Closed
inessilva4-lis
started this conversation in
Ideas / Feature Requests
Replies: 2 comments 1 reply
-
from nicegui import ui
ui.tree([
{'id': 'numbers', 'children': [{'id': '1'}, {'id': '2'}]},
{'id': 'letters', 'children': [{'id': 'A'}, {'id': 'B'}]},
], label_key='id').classes('w-full').props('no-selection-unset').on('click',lambda e:e.sender.run_method('setExpanded',e.sender.props['selected'],False if e.sender.props['selected'] in e.sender.props['expanded'] else True ))
ui.tree([
{'id': 'numbers', 'children': [{'id': '1'}, {'id': '2'}]},
{'id': 'letters', 'children': [{'id': 'A'}, {'id': 'B'}]},
], label_key='id').classes('w-full').props('no-selection-unset').on('click',lambda e:e.sender.collapse([e.sender.props['selected']]) if e.sender.props['selected'] in e.sender.props['expanded'] else e.sender.expand([e.sender.props['selected']]) )
ui.run() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for bringing this up, @inessilva4-lis! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I try to expand or collapse any node of my ui.tree, I am only able to do so by clicking on the arrow icon. I have this same issue on the documentation of nicegui.
On Quasar the tree nodes can be expanded/collapse by clicking anywhere on the header (see the basic usage example). How can I acquire a similar behaviour of quasar?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions