[TreeView] Expose the item slots at the tree view level #13867
Labels
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
customization: logic
Logic customizability
v8.x
The following issue should only be done in v8 because I don't want to introduce an API on the tree view components that would not work with the default
TreeItem
component. So I'm waiting for us to drop the old customization API before doing it.Add the following slots to the tree view components:
itemRoot
(passed to theroot
slot of theTreeItem
component)itemContent
(passed to thecontent
slot of theTreeItem
component)itemGroupTransition
(passed to thegroupTransition
slot of theTreeItem
component)itemIconContainer
(passed to theiconContainer
slot of theTreeItem
component)itemCheckbox
(passed to thecheckbox
slot of theTreeItem
component)itemLabel
(passed to thelabel
slot of theTreeItem
component)I propose to add those to both
SimpleTreeView
andRichTreeView
and if the slot is defined at the item level then it overrides the one at the tree view level (same as what we do for the icons).Here is a few customization examples it would simplify:
CustomAnimation.tsx:
LabelSlotProps.tsx:
Search keywords:
The text was updated successfully, but these errors were encountered: