SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.56k stars 267 forks source link

Tree component to provide only child selection [No Checkbox on the parent] #6431

Closed saorabhkr closed 1 year ago

saorabhkr commented 1 year ago

Is your feature request related to a problem? Please describe. We have a flavor of the Picker where the user would be able to search via parent and have only the children selected (with no checkboxes being shown for the parent rows) image

Describe the solution you'd like Option to hide the checkbox on the parent rows.

Describe alternatives you've considered No alternates

Additional context https://sap.github.io/ui5-webcomponents-react/?path=/story/data-display-tree--default-story&args=mode:MultiSelect SFSF

Lukas742 commented 1 year ago

Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.

dobrinyonkov commented 1 year ago

Hello @saorabhkr,

this can now be done using the ui5-tree-item-custom and the hideSelectionElement property. https://codesandbox.io/s/ui5-webcomponents-forked-tmp3wm?file=/index.html

Keep in mind that the content (the text) should be added with the content slot as shown in the above example.

Let us know if you encounter any issues.

Kind Regards, Dobrin