I created a simple table using React.js and MUI-Datatables :
(我使用React.js和MUI-Datatables创建了一个简单的表:)
import MUIDataTable from "mui-datatables";
const columns = ["Name", "Company", "City", "State"];
const data = [
["Joe James", "Test Corp", "Yonkers", "NY"],
["John Walsh", "Test Corp", "Hartford", "CT"],
["Bob Herm", "Test Corp", "Tampa", "FL"],
["James Houston", "Test Corp", "Dallas", "TX"],
];
const options = {
filterType: 'checkbox',
};
<MUIDataTable
title={"Employee List"}
data={data}
columns={columns}
options={options}
/>
How can I add a custom CSS class to a single row inside the table.
(如何将自定义CSS类添加到表中的单行中。)
Lets say I want the second row with John Walsh to have a green background color. (可以说,我希望John Walsh的第二行具有绿色背景色。)
ask by Klaus translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…