Browse Source

docs: Document Table column[key] can be ignored.

Related #6436
pull/6456/head
Wei Zhu 8 years ago
parent
commit
847153d998
  1. 2
      components/table/index.en-US.md
  2. 2
      components/table/index.zh-CN.md

2
components/table/index.en-US.md

@ -83,7 +83,7 @@ One of Property `columns` for descriping column, Column has the same API.
| Property | Description | Type | Default |
|---------------|--------------------------|-----------------|--------------|
| title | title of this column | string\|ReactNode | - |
| key | key of this column | string | - |
| key | key of this column, you can ignore thie prop if you've set a unique `dataIndex` | string | - |
| dataIndex | display field of the data record, could be set like `a.b.c` | string | - |
| render | renderer of table cell, has three params: text, record and index of this row. The render value should be a ReactNode, or a object for [colSpan/rowSpan config](#demo-colspan-rowspan) | Function(text, record, index) {} | - |
| filters | filter menu config | object[] | - |

2
components/table/index.zh-CN.md

@ -84,7 +84,7 @@ const columns = [{
| 参数 | 说明 | 类型 | 默认值 |
|-----------|----------------------------|-----------------|---------|
| title | 列头显示文字 | string\|ReactNode | - |
| key | React 需要的 key,建议设置 | string | - |
| key | React 需要的 key,如果已经设置了唯一的 `dataIndex`,可以忽略这个属性 | string | - |
| dataIndex | 列数据在数据项中对应的 key,支持 `a.b.c` 的嵌套写法 | string | - |
| render | 生成复杂数据的渲染函数,参数分别为当前行的值,当前行数据,行索引,@return里面可以设置表格[行/列合并](#demo-colspan-rowspan) | Function(text, record, index) {} | - |
| filters | 表头的筛选菜单项 | object[] | - |

Loading…
Cancel
Save