docs: update doc for Table (#3483)

* update Table en doc: fix header content mismatched

* update doc for Table: add description for props related to expand behavior
This commit is contained in:
zilong 2016-10-19 14:06:36 +08:00 committed by Benjy Cui
parent f747f10676
commit 6ceef46129
2 changed files with 9 additions and 3 deletions

View File

@ -50,7 +50,7 @@ const columns = [{
### Table
| Property | Type | Default | Description |
| Property | Description | Type | Default |
|---------------|--------------------------|-----------------|--------------|
| rowSelection | row selection [config](#rowSelection) | Object | null |
| pagination | pagination [config](/components/pagination), hide it via setting to `false` | Object | |
@ -62,6 +62,9 @@ const columns = [{
| expandedRowRender | expanded container render for each row | Function | - |
| defaultExpandedRowKeys | initial expanded row keys | Array | - |
| expandedRowKeys | current expanded rows keys | Array | - |
| defaultExpandAllRows | Expand All Rows initially | Boolean | false |
| onExpandedRowsChange | function to call when the expanded rows change | Function(expandedRows) | |
| onExpand | function to call when click expand icon | Function(expanded, record) | |
| onChange | callback that is called when pagination, filters, sorter is changed | Function(pagination, filters, sorter) | |
| loading | loading status of table | Boolean | false |
| locale | i18n text include filter, sort, empty text...etc | Object | filterConfirm: 'Ok' <br> filterReset: 'Reset' <br> emptyText: 'No Data' <br> [Default](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |
@ -77,7 +80,7 @@ const columns = [{
One of Property `columns` for descriping column.
| Property | Type | Default | Description |
| Property | Description | Type | Default |
|---------------|--------------------------|-----------------|--------------|
| title | title of this column | String or React.Element | - |
| key | key of this column | String | - |
@ -99,7 +102,7 @@ One of Property `columns` for descriping column.
Properties for selection.
| Property | Type | Default | Description |
| Property | Description | Type | Default |
|---------------|--------------------------|-----------------|--------------|
| type | `checkbox` or `radio` | String | `checkbox` |
| selectedRowKeys | controlled selected row keys | Array | [] |

View File

@ -63,6 +63,9 @@ const columns = [{
| expandedRowRender | 额外的展开行 | Function | - |
| defaultExpandedRowKeys | 默认展开的行 | Array | - |
| expandedRowKeys | 展开的行,控制属性 | Array | - |
| defaultExpandAllRows | 初始时,是否展开所有行 | Boolean | false |
| onExpandedRowsChange | 展开的行变化时触发 | Function(expandedRows) | |
| onExpand | 点击展开图标时触发 | Function(expanded, record) | |
| onChange | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter) | |
| loading | 页面是否加载中 | Boolean | false |
| locale | 默认文案设置,目前包括排序、过滤、空数据文案 | Object | filterConfirm: '确定' <br> filterReset: '重置' <br> emptyText: '暂无数据' <br> [默认值](https://github.com/ant-design/ant-design/issues/575#issuecomment-159169511) |