@fundamental-ngx/platform 0.43.35 → 0.43.36

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.
@@ -4103,6 +4103,7 @@ class TableComponent extends Table {
4103
4103
  }
4104
4104
  /** @hidden */
4105
4105
  onTableRowsChanged() {
4106
+ this._reIndexTableRows();
4106
4107
  this._calculateVisibleTableRows();
4107
4108
  this._calculateCheckedAll();
4108
4109
  }
@@ -4174,7 +4175,17 @@ class TableComponent extends Table {
4174
4175
  }))
4175
4176
  .subscribe((items) => {
4176
4177
  items.forEach((rows, parentRow) => {
4177
- this._tableRows.splice(parentRow.index + parentRow.children.length + 1, 0, ...rows);
4178
+ let nestedChildrenCount = 0;
4179
+ function tallyNestedChildren(parent) {
4180
+ if (parent.children) {
4181
+ nestedChildrenCount = nestedChildrenCount + parent.children.length;
4182
+ parent.children.forEach((child) => {
4183
+ tallyNestedChildren(child);
4184
+ });
4185
+ }
4186
+ }
4187
+ tallyNestedChildren(parentRow);
4188
+ this._tableRows.splice(parentRow.index + nestedChildrenCount + 1, 0, ...rows);
4178
4189
  parentRow.children.push(...rows);
4179
4190
  parentRow.lastChild = parentRow.children[parentRow.children.length - 1];
4180
4191
  this._setTableRows(this._tableRows);
@@ -4299,7 +4310,6 @@ class TableComponent extends Table {
4299
4310
  _setTableRows(rows = this._dataSourceTableRows) {
4300
4311
  this._dataSourceTableRows = rows;
4301
4312
  this._tableRows = [...this._newTableRows, ...this._dataSourceTableRows];
4302
- this._reIndexTableRows();
4303
4313
  this.onTableRowsChanged();
4304
4314
  this._calculateIsShownNavigationColumn();
4305
4315
  this._rangeSelector.reset();