mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
docs: update select documentation
This commit is contained in:
parent
14c7c63bbf
commit
2255dbada6
@ -59,7 +59,7 @@ Select component to select value from options.
|
||||
| removeIcon | The custom remove icon | ReactNode | - | |
|
||||
| searchValue | The current input "search" text | string | - | |
|
||||
| showArrow | Whether to show the drop-down arrow | boolean | true(for single select), false(for multiple select) | |
|
||||
| showSearch | Whether show search input in single mode | boolean | false | |
|
||||
| showSearch | Whether select is searchable | boolean | single: false, multple: true | |
|
||||
| size | Size of Select input | `large` \| `middle` \| `small` | `middle` | |
|
||||
| status | Set validation status | 'error' \| 'warning' | - | 4.19.0 |
|
||||
| suffixIcon | The custom suffix icon | ReactNode | - | |
|
||||
@ -107,7 +107,7 @@ Select component to select value from options.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why sometime search will show 2 same option when in `tag` mode?
|
||||
### Why sometime search will show 2 same option when in `tags` mode?
|
||||
|
||||
It's caused by option with different `label` and `value`. You can use `optionFilterProp="label"` to change filter logic instead.
|
||||
|
||||
|
@ -60,7 +60,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg
|
||||
| removeIcon | 自定义的多选框清除图标 | ReactNode | - | |
|
||||
| searchValue | 控制搜索文本 | string | - | |
|
||||
| showArrow | 是否显示下拉小箭头 | boolean | 单选为 true,多选为 false | |
|
||||
| showSearch | 使单选模式可搜索 | boolean | false | |
|
||||
| showSearch | 配置是否可搜索 | boolean | 单选为 false,多选为 true | |
|
||||
| size | 选择框大小 | `large` \| `middle` \| `small` | `middle` | |
|
||||
| status | 设置校验状态 | 'error' \| 'warning' | - | 4.19.0 |
|
||||
| suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | |
|
||||
@ -108,7 +108,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg
|
||||
|
||||
## FAQ
|
||||
|
||||
### `tag` 模式下为何搜索有时会出现两个相同选项?
|
||||
### `mode="tags"` 模式下为何搜索有时会出现两个相同选项?
|
||||
|
||||
这一般是 `options` 中的 `label` 和 `value` 不同导致的,你可以通过 `optionFilterProp="label"` 将过滤设置为展示值以避免这种情况。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user