drf-react-by-schema 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -457,8 +457,14 @@ const DataGridBySchemaEditable = (0, react_1.forwardRef)(({ schema, data, rowCou
|
|
|
457
457
|
const results = yield Promise.all(promises);
|
|
458
458
|
setSelectionModel([]);
|
|
459
459
|
setSelectionModelIds([]);
|
|
460
|
-
setDataGrid({
|
|
461
|
-
data
|
|
460
|
+
setDataGrid((currentData) => {
|
|
461
|
+
const updatedData = currentData.data.map((item) => {
|
|
462
|
+
const index = ids.indexOf(item.id);
|
|
463
|
+
return index === -1 ? item : newData[index];
|
|
464
|
+
});
|
|
465
|
+
return {
|
|
466
|
+
data: updatedData,
|
|
467
|
+
};
|
|
462
468
|
});
|
|
463
469
|
setSnackBar({
|
|
464
470
|
open: true,
|
package/package.json
CHANGED