Browse Source

docs: improve Cascader API documentation (#33484)

close #33477
pull/33485/head
afc163 3 years ago
committed by GitHub
parent
commit
fb59bd2a47
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.en-US.md
  2. 3
      CHANGELOG.zh-CN.md
  3. 1
      components/cascader/demo/search.md
  4. 4
      components/cascader/index.en-US.md
  5. 5
      components/cascader/index.zh-CN.md

1
CHANGELOG.en-US.md

@ -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

3
CHANGELOG.zh-CN.md

@ -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

1
components/cascader/demo/search.md

@ -74,6 +74,7 @@ ReactDOM.render(
onChange={onChange}
placeholder="Please select"
showSearch={{ filter }}
onSearch={value => console.log(value)}
/>,
mountNode,
);

4
components/cascader/index.en-US.md

@ -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 | - | |

5
components/cascader/index.zh-CN.md

@ -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

Loading…
Cancel
Save