From 802201913ce9a002b24a70754c2d99b359c6c585 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 12 Jul 2021 18:30:54 +0800 Subject: [PATCH] docs: TreeSelect `treeLoadedKeys` close #31340 --- CHANGELOG.en-US.md | 2 +- CHANGELOG.zh-CN.md | 2 +- components/tree/index.en-US.md | 1 + components/tree/index.zh-CN.md | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 06c439ebfb..2cfc5acff9 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -498,7 +498,7 @@ It is a wrong release which same as `4.10.3`, don't use it. - 🐞 Fix the compatibility issue of less 4.0.0. - 🐞 Fix the problem of cursor jumping when Typography is editable. [#28545](https://github.com/ant-design/ant-design/pull/28545) - 🐞 Fix the problem that repeatedly clicking on expanded nodes when Tree dynamically loads data will lead to wrong status.[#28349](https://github.com/ant-design/ant-design/issues/28349) [@liuchao233](https://github.com/react-component/tree/pull/401) -- 🐞 Fix the problem that TreeSelect & Select cannot open the dropdown menu when it's `searchValue` has value. [#28574](https://github.com/ant-design/ant-design/pull/28574) +- 🐞 Fix TreeSelect and Select cannot open the dropdown menu when it's `searchValue` has value. [#28574](https://github.com/ant-design/ant-design/pull/28574) - 🐞 Fix Dropdown disabled menu item link style. [#28578](https://github.com/ant-design/ant-design/pull/28578) - 🐞 Fix Progress `steps` display accuracy issue. [#28530](https://github.com/ant-design/ant-design/pull/28530) [@gaoryrt](https://github.com/gaoryrt) - 🐞 Fix Radio align issue in Chrome. [#28616](https://github.com/ant-design/ant-design/pull/28616) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index dca475d01c..e81e68fd2e 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -498,7 +498,7 @@ timeline: true - 🐞 修复不兼容 less 4.0.0 的问题。 - 🐞 修复 Typography 可编辑态光标跳动的问题。[#28545](https://github.com/ant-design/ant-design/pull/28545) - 🐞 修复 Tree 动态加载数据时重复点击展开节点会导致状态错误的问题。[#28349](https://github.com/ant-design/ant-design/issues/28349) [@liuchao233](https://github.com/react-component/tree/pull/401) -- 🐞 修复 TreeSelect & Select `searchValue` 在受控且有值时,下拉菜单无法打开的问题。[#28574](https://github.com/ant-design/ant-design/pull/28574) +- 🐞 修复 TreeSelect 和 Select `searchValue` 在受控且有值时,下拉菜单无法打开的问题。[#28574](https://github.com/ant-design/ant-design/pull/28574) - 🐞 修复 Dropdown 禁用菜单项内的链接样式。[#28578](https://github.com/ant-design/ant-design/pull/28578) - 🐞 修复 Progress `steps` 显示精度问题。[#28530](https://github.com/ant-design/ant-design/pull/28530) [@gaoryrt](https://github.com/gaoryrt) - 🐞 修复 Radio 在 Chrome 下的对齐样式问题。[#28616](https://github.com/ant-design/ant-design/pull/28616) diff --git a/components/tree/index.en-US.md b/components/tree/index.en-US.md index 85dea22dc2..4d25dbd398 100644 --- a/components/tree/index.en-US.md +++ b/components/tree/index.en-US.md @@ -44,6 +44,7 @@ Almost anything can be represented in a tree structure. Examples include directo | switcherIcon | Customize collapse/expand icon of tree node | ReactNode | - | | | titleRender | Customize tree node title render | (nodeData) => ReactNode | - | 4.5.0 | | treeData | The treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array) | array<{ key, title, children, \[disabled, selectable] }> | - | | +| treeLoadedKeys | (Controlled) Set loaded tree nodes, work with `loadData` only | string[] | [] | | | virtual | Disable virtual scroll when set to false | boolean | true | 4.1.0 | | onCheck | Callback function for when the onCheck event occurs | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - | | | onDragEnd | Callback function for when the onDragEnd event occurs | function({event, node}) | - | | diff --git a/components/tree/index.zh-CN.md b/components/tree/index.zh-CN.md index c91d98dbba..9e1fbedc65 100644 --- a/components/tree/index.zh-CN.md +++ b/components/tree/index.zh-CN.md @@ -45,6 +45,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Xh-oWqg9k/Tree.svg | switcherIcon | 自定义树节点的展开/折叠图标 | ReactNode | - | | | titleRender | 自定义渲染节点 | (nodeData) => ReactNode | - | 4.5.0 | | treeData | treeNodes 数据,如果设置则不需要手动构造 TreeNode 节点(key 在整个树范围内唯一) | array<{key, title, children, \[disabled, selectable]}> | - | | +| treeLoadedKeys | (受控)已经加载的节点,需要配合 `loadData` 使用 | string[] | [] | | | virtual | 设置 false 时关闭虚拟滚动 | boolean | true | 4.1.0 | | onCheck | 点击复选框触发 | function(checkedKeys, e:{checked: bool, checkedNodes, node, event, halfCheckedKeys}) | - | | | onDragEnd | dragend 触发时调用 | function({event, node}) | - | |