mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
close #10996. Update selectTree doc.
This commit is contained in:
parent
4cf18eaae8
commit
6ff7dd8fb9
@ -18,10 +18,11 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| allowClear | Whether allow clear | boolean | false |
|
||||
| autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
|
||||
| defaultValue | To set the initial selected treeNode(s). | string\|string\[] | - |
|
||||
| disabled | Disabled or not | boolean | false |
|
||||
| dropdownClassName | className of dropdown menu | string | - |
|
||||
| dropdownMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width | boolean | true |
|
||||
| dropdownMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width. Default set `min-width` same as input. | boolean | true |
|
||||
| dropdownStyle | To set the style of the dropdown menu | object | - |
|
||||
| filterTreeNode | Whether to filter treeNodes by input value. The value of `treeNodeFilterProp` is used for filtering by default. | boolean\|Function(inputValue: string, treeNode: TreeNode) (should return boolean) | Function |
|
||||
| getPopupContainer | To set the container of the dropdown menu. The default is to create a `div` element in `body`, you can reset it to the scrolling area and make a relative reposition. [example](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | () => document.body |
|
||||
@ -30,6 +31,7 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
| multiple | Support multiple or not, will be `true` when enable `treeCheckable`. | boolean | false |
|
||||
| placeholder | Placeholder of the select input | string | - |
|
||||
| searchPlaceholder | Placeholder of the search input | string | - |
|
||||
| searchValue | work with `onSearch` to make search value controlled. | string | - |
|
||||
| showCheckedStrategy | The way show selected item in box. **Default:** just show child nodes. **`TreeSelect.SHOW_ALL`:** show all checked treeNodes (include parent treeNode). **`TreeSelect.SHOW_PARENT`:** show checked treeNodes (just show parent treeNode). | enum { TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD |
|
||||
| showSearch | Whether to display a search input in the dropdown menu(valid only in the single mode) | boolean | false |
|
||||
| size | To set the size of the select input, options: `large` `small` | string | 'default' |
|
||||
|
@ -18,10 +18,11 @@ title: TreeSelect
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| allowClear | 显示清除按钮 | boolean | false |
|
||||
| autoClearSearchValue | 当多选模式下值被选择,自动清空搜索框 | boolean | true |
|
||||
| defaultValue | 指定默认选中的条目 | string/string\[] | - |
|
||||
| disabled | 是否禁用 | boolean | false |
|
||||
| dropdownClassName | 下拉菜单的 className 属性 | string | - |
|
||||
| dropdownMatchSelectWidth | 下拉菜单和选择器同宽 | boolean | true |
|
||||
| dropdownMatchSelectWidth | 下拉菜单和选择器同宽。默认将设置 `min-width`。 | boolean | true |
|
||||
| dropdownStyle | 下拉菜单的样式 | object | - |
|
||||
| filterTreeNode | 是否根据输入项进行筛选,默认用 treeNodeFilterProp 的值作为要筛选的 TreeNode 的属性值 | boolean\|Function(inputValue: string, treeNode: TreeNode) (函数需要返回bool值) | Function |
|
||||
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | Function(triggerNode) | () => document.body |
|
||||
@ -30,6 +31,7 @@ title: TreeSelect
|
||||
| multiple | 支持多选(当设置 treeCheckable 时自动变为true) | boolean | false |
|
||||
| placeholder | 选择框默认文字 | string | - |
|
||||
| searchPlaceholder | 搜索框默认文字 | string | - |
|
||||
| searchValue | 搜索框的值,可以通过 `onSearch` 获取用户输入 | string | - |
|
||||
| showCheckedStrategy | 定义选中项回填的方式。`TreeSelect.SHOW_ALL`: 显示所有选中节点(包括父节点). `TreeSelect.SHOW_PARENT`: 只显示父节点(当父节点下所有子节点都选中时). 默认只显示子节点. | enum{TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD |
|
||||
| showSearch | 在下拉中显示搜索框(仅在单选模式下生效) | boolean | false |
|
||||
| size | 选择框大小,可选 `large` `small` | string | 'default' |
|
||||
|
Loading…
Reference in New Issue
Block a user