@smartbit4all/ng-client 3.3.68 → 3.3.70

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.
@@ -9730,9 +9730,11 @@ class SmartGridComponent {
9730
9730
  else if (kind === GridViewDescriptorKindEnum.CARDS) {
9731
9731
  layoutDef = SmartLayoutDef.CARD;
9732
9732
  }
9733
- if (layoutDef) {
9734
- this.smartGrid.layoutDef = layoutDef;
9733
+ else {
9734
+ // default fallback TABLE
9735
+ layoutDef = SmartLayoutDef.TABLE;
9735
9736
  }
9737
+ this.smartGrid.layoutDef = layoutDef;
9736
9738
  }
9737
9739
  if (gridModel?.paginator !== undefined) {
9738
9740
  this.smartGrid.paginator = gridModel.paginator;
@@ -9756,8 +9758,12 @@ class SmartGridComponent {
9756
9758
  }
9757
9759
  this.isBlocked = false;
9758
9760
  }
9761
+ clearTable() {
9762
+ this.vcRefTable?.clear();
9763
+ this.componentRefTable = undefined;
9764
+ }
9759
9765
  async renderTable() {
9760
- this.treeControl = undefined;
9766
+ this.clearTree();
9761
9767
  let tableRow = this.smartGrid.gridModel.page.rows.map((item) => {
9762
9768
  return item;
9763
9769
  });
@@ -9928,9 +9934,14 @@ class SmartGridComponent {
9928
9934
  const selectionMode = this.service.gridModel.view?.descriptor?.selectionMode;
9929
9935
  return selectionMode === GridSelectionMode.MULTIPLE;
9930
9936
  }
9937
+ clearTree() {
9938
+ this.treeControl = undefined;
9939
+ this.treeDataSource = undefined;
9940
+ this.treeFlattener = undefined;
9941
+ this.treeChecklistSelection = undefined;
9942
+ }
9931
9943
  renderTree() {
9932
- this.vcRefTable?.clear();
9933
- this.componentRefTable = undefined;
9944
+ this.clearTable();
9934
9945
  if (!this.treeDataSource) {
9935
9946
  this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel, this.isExpandable, this.getChildren);
9936
9947
  this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);