sccoreui 6.1.29 → 6.1.31

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.
@@ -80,7 +80,7 @@ const updateCells = (updatedRowData, setUpdateRowData, api) => {
80
80
  exports.updateCells = updateCells;
81
81
  // Fill data in grid through drag
82
82
  const fillOperation = (params, api, parentNode, editedRecords, setEditedRecords) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
83
- var _a, _b;
83
+ var _a, _b, _c, _d;
84
84
  const { finalRange } = params;
85
85
  const { startRow, endRow, columns,
86
86
  // startColumn
@@ -98,8 +98,11 @@ const fillOperation = (params, api, parentNode, editedRecords, setEditedRecords)
98
98
  const rowData = rowNode === null || rowNode === void 0 ? void 0 : rowNode.data;
99
99
  // Check if rowData exists and update the field
100
100
  if (rowData && (rowNode.id != parentRowData.id)) {
101
+ // Skip edit for same values
102
+ if ((rowData === null || rowData === void 0 ? void 0 : rowData[columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field]) === (parentRowData === null || parentRowData === void 0 ? void 0 : parentRowData[columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field]))
103
+ continue;
101
104
  // If Dragged cell is grouped only group headers should edit vice versa to child cells
102
- if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.group) !== (parentNode === null || parentNode === void 0 ? void 0 : parentNode.group))
105
+ if (((_a = rowData === null || rowData === void 0 ? void 0 : rowData.orgHierarchy) === null || _a === void 0 ? void 0 : _a.length) !== ((_b = parentRowData === null || parentRowData === void 0 ? void 0 : parentRowData.orgHierarchy) === null || _b === void 0 ? void 0 : _b.length))
103
106
  continue;
104
107
  // if( rowData?.[columnDetails?.field] == EMPTY_RECORD || rowData?.type !== parentRowData?.type || !rowData?.[columnDetails?.field] ){
105
108
  // continue
@@ -109,8 +112,8 @@ const fillOperation = (params, api, parentNode, editedRecords, setEditedRecords)
109
112
  row: rowData,
110
113
  field: []
111
114
  };
112
- if (!((_a = schemaForEdit === null || schemaForEdit === void 0 ? void 0 : schemaForEdit.field) === null || _a === void 0 ? void 0 : _a.includes(columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field))) {
113
- (_b = schemaForEdit === null || schemaForEdit === void 0 ? void 0 : schemaForEdit.field) === null || _b === void 0 ? void 0 : _b.push(columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field);
115
+ if (!((_c = schemaForEdit === null || schemaForEdit === void 0 ? void 0 : schemaForEdit.field) === null || _c === void 0 ? void 0 : _c.includes(columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field))) {
116
+ (_d = schemaForEdit === null || schemaForEdit === void 0 ? void 0 : schemaForEdit.field) === null || _d === void 0 ? void 0 : _d.push(columnDetails === null || columnDetails === void 0 ? void 0 : columnDetails.field);
114
117
  }
115
118
  currentUpdatedRows.push(schemaForEdit);
116
119
  // Update the row
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.1.29",
3
+ "version": "6.1.31",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",