From 74645b7bafae804ecf1312cb9947615325ccbbc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Sun, 3 May 2020 16:10:37 +0800 Subject: [PATCH] docs: Add table render cache faq (#23833) --- components/table/index.en-US.md | 4 ++++ components/table/index.zh-CN.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index ceac93fc12..4d1fc3aee8 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -289,3 +289,7 @@ You may need to keep current page after filtering when fetch data from remote se ### Why Table pagination show size changer? In order to improve user experience, Pagination show size changer by default when `total >= 50` since `4.1.0`. You can set `showSizeChanger=false` to disable this feature. + +### Why Table fully render when state change? + +Table can not tell what state used in `columns.render`, so it always need fully render to avoid sync issue. But you can use `components` to customize component for conditional render. ref [#23763](https://github.com/ant-design/ant-design/issues/23763). diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index 7cc5e7aa57..5767ca0ac9 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -293,3 +293,7 @@ Table 移除了在 v3 中废弃的 `onRowClick`、`onRowDoubleClick`、`onRowMou ### 表格分页为何会出现 size 切换器? 自 `4.1.0` 起,Pagination 在 `total` 大于 50 条时会默认显示 size 切换器以提升用户交互体验。如果你不需要该功能,可以通过设置 `showSizeChanger` 为 `false` 来关闭。 + +### 为什么 更新 state 会导致全表渲染? + +由于 `columns` 支持 `render` 方法,因而 Table 无法知道哪些单元会受到影响。你可以通过 `components` 属性来精确控制子元素的渲染,请参考 [#23763](https://github.com/ant-design/ant-design/issues/23763)。