Tanstack React-table 无法从单元格函数返回 tsx

问题描述 投票:0回答:1

仅使用 React + Typescript 测试 Tanstack React-table lib,这表明我无法从 ColumnDef 的单元格函数返回 tsx/jsx:

我在这里遗漏了什么吗?

reactjs typescript react-table tanstack
1个回答
0
投票

识别 JSX 和 JS(括号)之间的区别。

cell: ({ getValue }) => <div>{getValue()}</div>
© www.soinside.com 2019 - 2024. All rights reserved.