Browse Source

docs: fix onHeaderRow documentation (#29103)

pull/29104/head
Benjamin Schuch 4 years ago
committed by GitHub
parent
commit
45f4f46483
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/table/index.en-US.md
  2. 4
      components/table/index.zh-CN.md

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

@ -83,7 +83,7 @@ const columns = [
| tableLayout | The [table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) attribute of table element | - \| `auto` \| `fixed` | -<hr />`fixed` when header/columns are fixed, or using `column.ellipsis` | | | tableLayout | The [table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) attribute of table element | - \| `auto` \| `fixed` | -<hr />`fixed` when header/columns are fixed, or using `column.ellipsis` | |
| title | Table title renderer | function(currentPageData) | - | | | title | Table title renderer | function(currentPageData) | - | |
| onChange | Callback executed when pagination, filters or sorter is changed | function(pagination, filters, sorter, extra: { currentDataSource: \[], action: `paginate` \| `sort` \| `filter` }) | - | | | onChange | Callback executed when pagination, filters or sorter is changed | function(pagination, filters, sorter, extra: { currentDataSource: \[], action: `paginate` \| `sort` \| `filter` }) | - | |
| onHeaderRow | Set props on per header row | function(column, index) | - | | | onHeaderRow | Set props on per header row | function(columns, index) | - | |
| onRow | Set props on per row | function(record, index) | - | | | onRow | Set props on per row | function(record, index) | - | |
#### onRow usage #### onRow usage
@ -101,7 +101,7 @@ Same as `onRow` `onHeaderRow` `onCell` `onHeaderCell`
onMouseLeave: event => {}, // mouse leave row onMouseLeave: event => {}, // mouse leave row
}; };
}} }}
onHeaderRow={column => { onHeaderRow={(columns, index) => {
return { return {
onClick: () => {}, // click header row onClick: () => {}, // click header row
}; };

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

@ -90,7 +90,7 @@ const columns = [
| tableLayout | 表格元素的 [table-layout](https://developer.mozilla.org/zh-CN/docs/Web/CSS/table-layout) 属性,设为 `fixed` 表示内容不会影响列的布局 | - \| `auto` \| `fixed` | 无<hr />固定表头/列或使用了 `column.ellipsis` 时,默认值为 `fixed` | | | tableLayout | 表格元素的 [table-layout](https://developer.mozilla.org/zh-CN/docs/Web/CSS/table-layout) 属性,设为 `fixed` 表示内容不会影响列的布局 | - \| `auto` \| `fixed` | 无<hr />固定表头/列或使用了 `column.ellipsis` 时,默认值为 `fixed` | |
| title | 表格标题 | function(currentPageData) | - | | | title | 表格标题 | function(currentPageData) | - | |
| onChange | 分页、排序、筛选变化时触发 | function(pagination, filters, sorter, extra: { currentDataSource: \[], action: `paginate` \| `sort` \| `filter` }) | - | | | onChange | 分页、排序、筛选变化时触发 | function(pagination, filters, sorter, extra: { currentDataSource: \[], action: `paginate` \| `sort` \| `filter` }) | - | |
| onHeaderRow | 设置头部行属性 | function(column, index) | - | | | onHeaderRow | 设置头部行属性 | function(columns, index) | - | |
| onRow | 设置行属性 | function(record, index) | - | | | onRow | 设置行属性 | function(record, index) | - | |
#### onRow 用法 #### onRow 用法
@ -108,7 +108,7 @@ const columns = [
onMouseLeave: event => {}, onMouseLeave: event => {},
}; };
}} }}
onHeaderRow={column => { onHeaderRow={(columns, index) => {
return { return {
onClick: () => {}, // 点击表头行 onClick: () => {}, // 点击表头行
}; };

Loading…
Cancel
Save