## TreeSelect
The tree selector of the dropdown menu, it combines the functions of components el-tree and el-select.
### Basic usage
:::demo
```html
click text to select
show-checkbox
```
:::
### Select any level
When using the check-strictly=true attribute, any node can be checked, otherwise only leaf nodes are supported.
:::demo
```html
click text to select
show-checkbox, only click checkbox to select
```
:::
### Multiple Selection
Multiple selection using clicks or checkbox.
:::demo
```html
click text to select
show checkbox
show checkbox with `check-strictly`
```
:::
### Clearable
You can clear tree-select using a clear icon.
Set clearable attribute for el-tree-select and a clear icon will appear.
:::demo
```html
```
:::
### Disabled Selection
Disable options using the disabled field.
:::demo
```html
```
:::
### Filterable
Use keyword filtering or custom filtering methods. filterMethod can custom filter method for data.
:::demo
```html
filterable
filterMethod
```
:::
### LazyLoad
Lazy loading of tree nodes, suitable for large data lists.
:::demo
```html
```
:::
### Attributes
| Name | Description | Type | Accepted Values | Default|
| --------------------- | ------------------------------------------------------------------------------------------------- | --------------------------- | ----------------- | ------ |
| value / v-model | binding value | boolean / string / number | — | — |
| data | tree data | array | — | — |
| multiple | whether multiple-select is activated | boolean | — | false |
| disabled | whether Select is disabled | boolean | — | false |
| size | size of Input | string | medium/small/mini | — |
| clearable | whether select can be cleared | boolean | — | false |
| collapse-tags | whether to collapse tags to a text when multiple selecting | boolean | — | false |
| name | the name attribute of Tree-select input | string | — | — |
| placeholder | placeholder | string | — | 请选择 |
| filterable | whether Tree-select is filterable | boolean | — | false |
| empty-text | displayed text when there is no data | String | — | — |
| node-key | unique identity key name for nodes, its value should be unique across the whole tree | String | — | — |
| props | configuration options, see the following table | object | — | — |
| render-after-expand | whether to render child nodes only after a parent node is expanded for the first time | boolean | — | true |
| load | method for loading subtree data, only works when lazy is true | function(node, resolve) | — | — |
| default-expand-all | whether to expand all nodes by default | boolean | — | false |
| auto-expand-parent | whether to expand father node when a child node is expanded | boolean | — | true |
| show-checkbox | whether node is selectable | boolean | — | false |
| check-strictly | whether checked state of a node not affects its father and child nodes when show-checkbox is true | boolean | — | false |
| filter-method | custom filter method | Function(value, data, node) | — | — |
| accordion | whether only one node among the same level can be expanded at one time | boolean | — | false |
| indent | horizontal indentation of nodes in adjacent levels in pixels | number | — | 16 |
| lazy | whether to lazy load leaf node, used with load attribute | boolean | — | false |
| popper-append-to-body | whether to append the popper menu to body. If the positioning of the popper is wrong, you can try to set this prop to false | boolean | - | true |
### props
| Attribute| Description | Type | Accepted Values | Default |
| -------- | ----------------------------------------------------------------------------- | ----------------------------- | -------------------| ----------------|
| label | specify which key of node object is used as the node's label | string, function(data, node) | — | — |
| children | specify which node object is used as the node's subtree | string | — | — |
| disabled | specify which key of node object represents if node's checkbox is disabled | boolean, function(data, node) | — | — |
| isLeaf | specify whether the node is a leaf node, only works when lazy load is enabled | boolean, function(data, node) | — | — |
### Events
| Method | Description | Parameters |
| -------------- | --------------------------------------------------------------- | ------------------------------------------ |
| change | triggers when the selected value changes | current selected value |
| visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise |
| remove-tag | triggers when a tag is removed in multiple mode | removed tag value |
| clear | triggers when the clear icon is clicked in a clearable Select | — |
| blur | triggers when Input blurs | (event: Event) |
| focus | triggers when Input focuses | (event: Event) |