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: newData,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drf-react-by-schema",
3
- "version": "0.17.2",
3
+ "version": "0.17.4",
4
4
  "description": "Components and Tools for building a React App having Django Rest Framework (DRF) as server",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",