From 245f53b1fce01d66ccd757ad4ad1ca1a0a090fb7 Mon Sep 17 00:00:00 2001 From: Shaw Drastin <168159404+showier-drastic@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:34:23 +0800 Subject: [PATCH] docs: Improve description of table column render (#52010) * Fix description of table colum render Signed-off-by: Shaw Drastin <168159404+showier-drastic@users.noreply.github.com> * Improve description of table column render Signed-off-by: Shaw Drastin <168159404+showier-drastic@users.noreply.github.com> --------- Signed-off-by: Shaw Drastin <168159404+showier-drastic@users.noreply.github.com> --- components/table/index.en-US.md | 2 +- components/table/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index d4792906b5..2a0eb623ce 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -203,7 +203,7 @@ One of the Table `columns` prop for describing the table's columns, Column has t | filterDropdownProps | Customized dropdown props, `filterDropdownOpen` and `onFilterDropdownOpenChange` were available before `<5.22.0` | [DropdownProps](/components/dropdown#api) | - | 5.22.0 | | fixed | (IE not support) Set column to be fixed: `true`(same as left) `'left'` `'right'` | boolean \| string | false | | | key | Unique key of this column, you can ignore this prop if you've set a unique `dataIndex` | string | - | | -| render | Renderer of the table cell. The return value should be a ReactNode | function(text, record, index) {} | - | | +| render | Renderer of the table cell. `value` is the value of current cell; `record` is the value of current column; `index` is the row number. The return value should be a ReactNode | function(value, record, index) {} | - | | | responsive | The list of breakpoints at which to display this column. Always visible if not set | [Breakpoint](https://github.com/ant-design/ant-design/blob/015109b42b85c63146371b4e32b883cf97b088e8/components/_util/responsiveObserve.ts#L1)\[] | - | 4.2.0 | | rowScope | Set scope attribute for all cells in this column | `row` \| `rowgroup` | - | 5.1.0 | | shouldCellUpdate | Control cell render logic | (record, prevRecord) => boolean | - | 4.3.0 | diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index a4611e0f12..418dee4740 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -205,7 +205,7 @@ const columns = [ | filterDropdownProps | 自定义下拉属性,在 `<5.22.0` 之前可用 `filterDropdownOpen` 和 `onFilterDropdownOpenChange` | [DropdownProps](/components/dropdown#api) | - | 5.22.0 | | fixed | (IE 下无效)列是否固定,可选 `true` (等效于 `left`) `left` `right` | boolean \| string | false | | | key | React 需要的 key,如果已经设置了唯一的 `dataIndex`,可以忽略这个属性 | string | - | | -| render | 生成复杂数据的渲染函数,参数分别为当前行的值,当前行数据,行索引 | function(text, record, index) {} | - | | +| render | 生成复杂数据的渲染函数,参数分别为当前单元格的值,当前行数据,行索引 | function(value, record, index) {} | - | | | responsive | 响应式 breakpoint 配置列表。未设置则始终可见。 | [Breakpoint](https://github.com/ant-design/ant-design/blob/015109b42b85c63146371b4e32b883cf97b088e8/components/_util/responsiveObserve.ts#L1)\[] | - | 4.2.0 | | rowScope | 设置列范围 | `row` \| `rowgroup` | - | 5.1.0 | | shouldCellUpdate | 自定义单元格渲染时机 | (record, prevRecord) => boolean | - | 4.3.0 |