Prop | Default | Type |
---|---|---|
as | 'ul' | AsTag | Component The element or component this component should render as. Can be overwritten by |
asChild | boolean Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
bubbleSelect | boolean When | |
defaultExpanded | string[] The value of the expanded tree when initially rendered. Use when you do not need to control the state of the expanded tree | |
defaultValue | Record<string, any> | Record<string, any>[] The value of the tree when initially rendered. Use when you do not need to control the state of the tree | |
dir | 'ltr' | 'rtl' The reading direction of the listbox when applicable. | |
disabled | boolean When | |
expanded | string[] The controlled value of the expanded item. Can be binded with with | |
getChildren | val.children | ((val: Record<string, any>) => Record<string, any>[]) This function is passed the index of each item and should return a list of children for that item |
getKey* | (val: Record<string, any>): string This function is passed the index of each item and should return a unique key for that item | |
items | Record<string, any>[] List of items | |
modelValue | Record<string, any> | Record<string, any>[] The controlled value of the tree. Can be binded with with | |
multiple | boolean Whether multiple options can be selected or not. | |
propagateSelect | boolean When | |
selectionBehavior | 'toggle' | 'replace' | 'toggle' How multiple selection should behave in the collection. |
Emit | Payload |
---|---|
update:expanded | [val: string[]] |
update:modelValue | [val: Record<string, any> | Record<string, any>[]] Event handler called when the value of the toggle changes. |
Slots (default) | Payload |
---|---|
flattenItems | FlattenedItem<Record<string, any>>[] |
modelValue | Record<string, any> | Record<string, any>[] |
expanded | string[] |