使用 React Table 库时,如何在特定列的所有单元格中加粗文本?

How can I bold text in all cells in one specific column when using React Table library?

如何将 table 中一个特定列的所有单元格中的文本加粗?通常,我将如何设置 table 中特定列的单元格的样式。顺便说一句,我正在使用 React Table 库的 v7。

在您的 columns 数组中,您可以将以下内容添加到您希望变为粗体的列中:

Cell: ({ value }) => <b>{value}</b>

您可以在此处找到完整示例:https://codesandbox.io/s/intelligent-worker-txl91?file=/src/App.js