小编Thi*_*ijs的帖子

React table v8 - 如何渲染自定义单元格内容?

我正在使用@tanstack/react-tablev8,我想在我的表格行单元格之一中添加一些图标和按钮。查看文档我可以使用显示列:

Display columns do not have a data model which means they cannot be sorted, filtered, etc, but they can be used to display arbitrary content in the table, eg. a row actions button, checkbox, expander, etc.

该文档还提到了有关单元格内容的自定义渲染的内容: By default, columns cells will display their data model value as a string. You can override this behavior by providing custom rendering implementations. ... You can provide a custom cell formatter by passing a function to the cell …

react-table

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

react-table ×1