Skip to content

Commit

Permalink
feat: Table support onScroll event (ant-design#47986)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored and CooperHash committed Mar 22, 2024
1 parent 7f933a7 commit ec8774c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion components/table/index.en-US.md
Expand Up @@ -138,10 +138,11 @@ Common props ref:[Common props](/docs/react/common-props)
| summary | Summary content | (currentData) => ReactNode | - | |
| 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) | - | |
| virtual | Support virtual list | boolean | - | 5.9.0 |
| 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(columns, index) | - | |
| onRow | Set props on per row | function(record, index) | - | |
| virtual | Support virtual list | boolean | - | 5.9.0 |
| onScroll | Triggered when the table body is scrolled. Note that only vertical scrolling will trigger the event when `virtual` | function(event) | - | 5.16.0 |

### Table ref

Expand Down
3 changes: 2 additions & 1 deletion components/table/index.zh-CN.md
Expand Up @@ -139,10 +139,11 @@ const columns = [
| summary | 总结栏 | (currentData) => ReactNode | - | |
| tableLayout | 表格元素的 [table-layout](https://developer.mozilla.org/zh-CN/docs/Web/CSS/table-layout) 属性,设为 `fixed` 表示内容不会影响列的布局 | - \| `auto` \| `fixed` | 无<hr />固定表头/列或使用了 `column.ellipsis` 时,默认值为 `fixed` | |
| title | 表格标题 | function(currentPageData) | - | |
| virtual | 支持虚拟列表 | boolean | - | 5.9.0 |
| onChange | 分页、排序、筛选变化时触发 | function(pagination, filters, sorter, extra: { currentDataSource: \[], action: `paginate` \| `sort` \| `filter` }) | - | |
| onHeaderRow | 设置头部行属性 | function(columns, index) | - | |
| onRow | 设置行属性 | function(record, index) | - | |
| virtual | 支持虚拟列表 | boolean | - | 5.9.0 |
| onScroll | 表单内容滚动时触发(虚拟滚动下只有垂直滚动会触发事件) | function(event) | - | 5.16.0 |

### Table ref

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -153,7 +153,7 @@
"rc-slider": "~10.5.0",
"rc-steps": "~6.0.1",
"rc-switch": "~4.1.0",
"rc-table": "~7.42.0",
"rc-table": "~7.43.0",
"rc-tabs": "~14.1.1",
"rc-textarea": "~1.6.3",
"rc-tooltip": "~6.2.0",
Expand Down

0 comments on commit ec8774c

Please sign in to comment.