TreeSelect
Component documentation for TreeSelect.
TreeSelect
Component documentation for TreeSelect.
Basic Usage
TreeSelect
Demo loads on client.
Notes
- When
multipleis true,modelValuemust be an array; clearing returns an empty array. - When
multipleis false, clearing returnsundefined.
API
TxTreeSelect Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | number | Array<string | number> | undefined | - | TextValue(v-model) |
nodes | TreeSelectNode[] | [] | Description for nodes. |
multiple | boolean | false | Description for multiple. |
disabled | boolean | false | Description for disabled. |
placeholder | string | 'Text' | Description for placeholder. |
searchable | boolean | true | Description for searchable. |
clearable | boolean | true | Description for clearable. |
placement | PopoverPlacement | 'bottom-start' | Description for placement. |
dropdownOffset | number | 6 | Description for dropdownOffset. |
dropdownWidth | number | 0 | Description for dropdownWidth. |
dropdownMaxWidth | number | 480 | Description for dropdownMaxWidth. |
dropdownMaxHeight | number | 320 | Description for dropdownMaxHeight. |
defaultExpandedKeys | Array<string | number> | [] | DefaultText key |
TreeSelectNode
| Field | Type | Description |
|---|---|---|
key | string | number | Description for key. |
label | string | Description for label. |
disabled | boolean | Description for disabled. |
children | TreeSelectNode[] | Description for children. |
Events
| Event | Params | Description |
|---|---|---|
update:modelValue | (v) | Description for update:modelValue. |
change | (v) | Description for change. |
open | - | Description for open. |
close | - | Description for close. |
Slots
| Name | Description |
|---|---|
node | Description for node. |
Expose
| Name | Type | Description |
|---|---|---|
open() | () => void | Description for open(). |
close() | () => void | Description for close(). |
toggle() | () => void | Description for toggle(). |
focus() | () => void | Description for focus(). |
blur() | () => void | Description for blur(). |
clear() | () => void | Description for clear(). |
setValue(v) | (v) => void | Description for setValue(v). |
getValue() | () => any | Description for getValue(). |
getCheckedKeys() | () => Array<string | number> | Text key(Text) |
Was this helpful?