我是新来的反应。对于我的项目,我想通过单击表格中的图标来更改我的状态,这将改变我的状态。我正在使用 getCellActions (react-data-grid)。如何将我的自定义函数单独与列和行对象一起传递。
提前致谢。
NT:我没有使用 redux
getCellActions(column, row, state) {
if(column.key === 'modify'){
return [
{
icon: 'fa fa-edit',
callback: () => {
console.log(row.id);
//this.getRoleData();
}
}
];
}
}