用启用的mui x数据网格V5。 我的用例很简单,但我无法从文档中弄清楚。
带有一列的表格,我正在尝试更新用户编辑的单元格下方的所有单元格。原始渲染:
2 | |
3 | |
4 | |
5 | |
6 | |
Id
2 | 50 | |
基本上,我期待着像肮脏或感动的状态之类的东西,但我在文档中找不到它。 |
experimentalFeatures={{ newEditingApi: true }}
experimentalFeatures={{ newEditingApi: true }}
<DataGrid
experimentalFeatures={{ newEditingApi: true }}
editMode="row"
processRowUpdate={processRowUpdate}
...
/>
const processRowUpdate = (newRow: typeof allRows[0], oldRow: typeof allRows[0]) => {
return { ...newRow, isDirty: true }
}