Skip to content

Commit

Permalink
docs: update faq
Browse files Browse the repository at this point in the history
  • Loading branch information
linxianxi committed Jan 24, 2024
1 parent 35dfbd8 commit e089321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/table/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,6 @@ Fixed column use `z-index` to make it over other columns. You will find sometime

Since `4.1.0`, You can use [`rowSelection.renderCell`](https://ant.design/components/table/#rowselection) to custom render Table Checkbox. If you want to add Tooltip, please refer to this [demo](https://codesandbox.io/s/table-row-tooltip-v79j2v).

### Why does components.body.wrapper crash when virtual is enabled?
### Why does components.body.wrapper report an error when virtual is enabled?

Because virtual table needs to get its ref to do some calculations, so you need to use `React.forwardRef` wrapper and pass the ref to the dom
2 changes: 1 addition & 1 deletion components/table/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,6 @@ return <Table rowKey={(record) => record.uid} />;

`4.1.0` 起,可以通过 [rowSelection](https://ant.design/components/table-cn/#rowselection)`renderCell` 属性控制,可以参考此处 [Demo](https://codesandbox.io/s/table-row-tooltip-v79j2v) 实现展示 Tooltip 需求或其他自定义的需求。

### 为什么 components.body.wrapper 在 virtual 开启时会崩溃
### 为什么 components.body.wrapper 在 virtual 开启时会报错

因为虚拟表格需要获取其 ref 做一些计算,所以你需要使用 `React.forwardRef` 包裹并传递 ref 到 dom。

0 comments on commit e089321

Please sign in to comment.