-
Notifications
You must be signed in to change notification settings - Fork 273
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
[ui5-tree/ui5-tree-item] - Add a SelectionMode attribute : just on checkbox or the entire item #4502
Comments
Hi team, Kind regards, |
When using the ui5-list or ui5-tree with mode MultiSelect, SingleSelectEnd, or SingleSelectBegin it is sometimes undesireable for a click on an item to always trigger a selection change. An example use case would be a multi select tree where clicking the checkbox changes the selection, but clicking the item displays more information. We introduce a noClickSelect property on ui5-list and ui5-tree that enables this behaviour. Fixes SAP#4502
When using the ui5-list or ui5-tree with mode MultiSelect, SingleSelectEnd, or SingleSelectBegin it is sometimes undesirable for a click on an item to always trigger a selection change. An example use case would be a multi select tree where clicking the checkbox changes the selection, but clicking the item displays more information. We introduce a noClickSelect property on ui5-list and ui5-tree that enables this behavior. Fixes SAP#4502
Add the preventable behaviour of the item-click event to the Tree component too. Related to: #4502
Hi @lucianiz, With #4708 we extended item-click event and now it can be prevented to execute default behavior (selection). If you have SingleSelect / MultiSelect mode it better to listen for selection-change event if you want to observe change in selected list items. You can check this snippix to see how it works now: Regards, |
Feature Request Description
We have a use case where we need to display hierarchically structured data with the option to select (MultiSelect) but the selection of an item and clicking on an item need to be disconnected. Clicking on the item displays additional information about the item and the selection is used to mark multiple items for various actions.
The depth can be more than 3 levels deep but the standard data entry usually has 3.
In summary what we need is that when a user clicks on the element but not on the checkbox, the checkbox should not be selected,
When clicking on the checkbox directly, the checkbox should be marked:
I've noticed that currently the cursor changes when hovering over the checkbox as opposed to the rest of the tree-item.
Proposed Solution
Have an additional attribute called SelectionMode with values "Item"(default) or "Checkbox".
There should also be another event added to distinguish between clicking on the Item or clicking on the Checkbox.
Proposed Alternatives
Another option would be to add another value to the Mode attribute, called "MultiSelectCheckbox" (or something like that)
I think the first option might be better since it could also be applied for the SingleSelect mode.
Additional Context
Add other context or screenshots related to the feature request here.
Priority
A clear and concise description of the impact/urgency of the required feature.
Stakeholder Info (if applicable)
The text was updated successfully, but these errors were encountered: