Skip to content

Commit

Permalink
docs: Table QA about rowSelection renderCell (#35494)
Browse files Browse the repository at this point in the history
* Update index.zh-CN.md

之前需要在 可选列的勾选框 中增加 Tooltip,没有在文档中找到相关的文档,通过搜索 issue,以为暂时不支持,看了源码才发现已经支持了。

所以想要完善一下文档,可以方便其他用户找到此内容。

* docs: Table QA about rowSelection renderCell

update US doc
  • Loading branch information
mrlmx committed May 11, 2022
1 parent 19f5514 commit 765bc1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/table/index.en-US.md
Expand Up @@ -316,3 +316,7 @@ Table can not tell what state used in `columns.render`, so it always need fully
### How to handle fixed column display over the mask layout?

Fixed column use `z-index` to make it over other columns. You will find sometime fixed columns also over your mask layout. You can set `z-index` on your mask layout to resolve.

### How to custom render Table Checkbox(For example, adding Tooltip)?

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).
4 changes: 4 additions & 0 deletions components/table/index.zh-CN.md
Expand Up @@ -316,3 +316,7 @@ Table 移除了在 v3 中废弃的 `onRowClick`、`onRowDoubleClick`、`onRowMou
### 固定列穿透到最上层该怎么办?

固定列通过 `z-index` 属性将其悬浮于非固定列之上,这使得有时候你会发现在 Table 上放置遮罩层时固定列会被透过的情况。为遮罩层设置更高的 `z-index` 覆盖住固定列即可。

### 如何自定义渲染可选列的勾选框(比如增加 Tooltip)?

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

0 comments on commit 765bc1e

Please sign in to comment.