Skip to content

Commit

Permalink
docs: improve Cascader API documentation (ant-design#33484)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Dec 30, 2021
1 parent 3913fd5 commit fb59bd2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ timeline: true
- 🐞 Fix Input cannot clear content when focus it. [#31931](https://github.com/ant-design/ant-design/pull/31931) [@adaex](https://github.com/adaex)
- Cascader
- 🔥 Cascader support `multiple` mode. [#31936](https://github.com/ant-design/ant-design/pull/31936)
- 🆕 Cascader support `onSearch` and `searchValue` props. [#31936](https://github.com/ant-design/ant-design/pull/31936)
- 🆕 Cascader add `title` prop with content by default. [#31237](https://github.com/ant-design/ant-design/pull/31237) [@yingpengsha](https://github.com/yingpengsha)
- 🐞 Fix Cascader missing `popupClassName` and `popupPlacement` props. [#32143](https://github.com/ant-design/ant-design/pull/32143)
- Select
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ timeline: true
- 🐞 Input.TextArea `maxLength` 属性现在会传给原生 textarea 标签。[#32448](https://github.com/ant-design/ant-design/pull/32448) [@MOHAMMADArsalan](https://github.com/MOHAMMADArsalan)
- 🐞 修复 Input 聚焦时点击清除图标无效的问题。[#31931](https://github.com/ant-design/ant-design/pull/31931) [@adaex](https://github.com/adaex)
- Cascader
- 🔥 Cascader 支持 `multiple` 模式。[#31936](https://github.com/ant-design/ant-design/pull/31936)
- 🔥 Cascader 支持 `multiple` 多选模式。[#31936](https://github.com/ant-design/ant-design/pull/31936)
- 🆕 Cascader 支持 `onSearch``searchValue` 属性。[#31936](https://github.com/ant-design/ant-design/pull/31936)
- 🆕 在 `Cascader` 组件中,默认给选中值的文本添加 `title` 属性。[#31237](https://github.com/ant-design/ant-design/pull/31237) [@yingpengsha](https://github.com/yingpengsha)
- 🐞 修复 Cascader 中 `popupClassName``popupPlacement` 属性无效问题。[#32143](https://github.com/ant-design/ant-design/pull/32143)
- Select
Expand Down
1 change: 1 addition & 0 deletions components/cascader/demo/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ ReactDOM.render(
onChange={onChange}
placeholder="Please select"
showSearch={{ filter }}
onSearch={value => console.log(value)}
/>,
mountNode,
);
Expand Down
4 changes: 2 additions & 2 deletions components/cascader/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Cascade selection box.
| onChange | Callback when finishing cascader select | (value, selectedOptions) => void | - | |
| onDropdownVisibleChange | Callback when popup shown or hidden | (value) => void | - | 4.17.0 |
| multiple | Support multiple or not | boolean | - | 4.17.0 |
| searchValue | Set search value,Need work with `showSearch` | string | - | |
| onSearch | The callback function triggered when input changed | (search: string) => void | - | |
| searchValue | Set search value,Need work with `showSearch` | string | - | 4.17.0 |
| onSearch | The callback function triggered when input changed | (search: string) => void | - | 4.17.0 |
| dropdownMenuColumnStyle | The style of the drop-down menu column | CSSProperties | - | |
| loadingIcon | The apparence of lazy loading (now is useless) | ReactNode | - | |

Expand Down
5 changes: 2 additions & 3 deletions components/cascader/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ cover: https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg
| onChange | 选择完成后的回调 | (value, selectedOptions) => void | - | |
| onDropdownVisibleChange | 显示/隐藏浮层的回调 | (value) => void | - | 4.17.0 |
| multiple | 支持多选节点 | boolean | - | 4.17.0 |
| searchValue | 设置搜索的值,需要与 `showSearch` 配合使用 | string | - | |
| onSearch | 监听搜索,返回输入的值 | (search: string) => void | - | |
| searchValue | 设置搜索的值,需要与 `showSearch` 配合使用 | string | - | 4.17.0 |
| onSearch | 监听搜索,返回输入的值 | (search: string) => void | - | 4.17.0 |
| dropdownMenuColumnStyle | 下拉菜单列的样式 | CSSProperties | - | |
| loadingIcon | 动态加载时的加载动画 (目前这个属性设置后不生效) | ReactNode | - | |

### showSearch

Expand Down

0 comments on commit fb59bd2

Please sign in to comment.