-
Notifications
You must be signed in to change notification settings - Fork 82
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
Improve TreeGrid keyboard navigation #7385
Labels
Comments
The workaround is to extend vaadin-grid-tree-toggle and override the default keyboard navigation with our own: Example: And https://github.com/TatuLund/tree-flow/blob/v24/src/main/java/org/vaadin/tatu/Tree.java#L130 In this version ENTER toggles the selection and SPACE toggles the expand/collapse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe your motivation
The tactile feel of the TreeGrid keyboard navigation is very un-intuitive and poor. My own experience comes from creation of Tree add-on
https://vaadin.com/directory/component/tree
Which is basically just one column TreeGrid, and the shortcomings of the TreeGrid keyboard navigation becomes more pronounced in this case. E.g. space key toggles both the expand/collapse and selection. So there is a conflict. This is less severe in multi column case, as you can navigate out of hierarchy column, and handle selection by hitting space in other column.
You can use additional arrow left key press to go row navigation mode, after which you can toggle row selection by space, and it no longer toggles expand/collapse. However it is very easy mix between the modes by accidental additional arrow strokes and hence do un-intentional expand/collapse or select.
Furthermore I made TreeComboBox https://vaadin.com/directory/component/treecombobox Which otherwise works very nicely, but when using Tree in Popup that is part of the field, you would appreciate well working keyboard navigation.
Describe the solution you'd like
Clearer navigation where there is no overloading of the same keys for different things.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: