@syncfusion/ej2-treegrid 19.3.55 → 19.3.57

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.
@@ -5278,7 +5278,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5278
5278
  const row = getObject('rows', rec);
5279
5279
  const record = getObject('records', rec);
5280
5280
  for (let i = 0; i < record.length; i++) {
5281
- if (record[i].parentItem !== undefined) {
5281
+ if (!isNullOrUndefined(record[i].parentItem)) {
5282
5282
  const pindex = this.flatData[record[i].parentItem.index].index;
5283
5283
  if (this.flatData[pindex].expanded === false) {
5284
5284
  record.push(this.flatData[pindex]);
@@ -10487,13 +10487,23 @@ class Edit$1 {
10487
10487
  }
10488
10488
  if (args.requestType === 'delete') {
10489
10489
  const data = args.data;
10490
+ if (isNullOrUndefined(args.data[0].uniqueID)) {
10491
+ const primaryKeys = this.parent.getPrimaryKeyFieldNames();
10492
+ for (let i = 0; i < data.length; i++) {
10493
+ this.parent.flatData.filter((e) => {
10494
+ if (e[primaryKeys[0]] === args.data[i][primaryKeys[0]]) {
10495
+ data[i] = e;
10496
+ }
10497
+ });
10498
+ }
10499
+ }
10490
10500
  for (let i = 0; i < data.length; i++) {
10491
10501
  this.deleteUniqueID(data[i].uniqueID);
10492
10502
  const childs = findChildrenRecords(data[i]);
10493
10503
  for (let c = 0; c < childs.length; c++) {
10494
10504
  this.deleteUniqueID(childs[c].uniqueID);
10495
10505
  }
10496
- args.data = [...data, ...childs];
10506
+ args.data = [...args.data, ...childs];
10497
10507
  }
10498
10508
  }
10499
10509
  if (args.requestType === 'add' || (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling))) {