Muix数据网格获取肮脏字段

问题描述 投票:0回答:1

用启用的mui x数据网格V5。 我的用例很简单,但我无法从文档中弄清楚。

带有一列的表格,我正在尝试更新用户编辑的单元格下方的所有单元格。
原始渲染:

Idmount1505050505050现在说用户编辑数量在第3行中的数量从50到60
2
3
4
5
6
the nessed结果:

Id
mountCOMMENT150未开 未开 360用户任职 460撰写的原因范围并不脏560撰写的原因范围并不脏660撰写的原因范围并不脏您如何知道MUI X DataGrid中的字段是否脏? wresswress wrange我自己的问题。在V6或启用
2 50
基本上,我期待着像肮脏或感动的状态之类的东西,但我在文档中找不到它。
experimentalFeatures={{ newEditingApi: true }}
中:

experimentalFeatures={{ newEditingApi: true }}
implementIsdirty

<DataGrid experimentalFeatures={{ newEditingApi: true }} editMode="row" processRowUpdate={processRowUpdate} ... />

为字段
reactjs material-ui mui-x-data-grid
1个回答
0
投票
const processRowUpdate = (newRow: typeof allRows[0], oldRow: typeof allRows[0]) => { return { ...newRow, isDirty: true } }

	

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.