我已经制作了selection: true
,但是我在材料表中遇到了问题,那就是当我单击它们时,这些复选框都没有被选中。谁能告诉我原因?
<MaterialTable
columns={columns}
data={dummyData}
options={{
search: false,
selection: true,
showTitle: false,
rowStyle: {
fontSize: 12,
},
paging: false,
}}
icons={tableIcons}
editable={{
onRowUpdate: (newData, oldData) =>
new Promise((resolve) => {
handleRowUpdate(newData, oldData, resolve);
}),
onRowAdd: (newData) =>
new Promise((resolve) => {
handleRowAdd(newData, resolve);
}),
onRowDelete: (oldData) =>
new Promise((resolve) => {
handleRowDelete(oldData, resolve);
}),
}}
/>