@smartbit4all/ng-client 3.3.181 → 3.3.183

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.
@@ -15512,13 +15512,15 @@ class SmartComponentApiClient {
15512
15512
  }
15513
15513
  async load() {
15514
15514
  this.componentModelLoaded = false;
15515
- this.uuid = this.viewContext.getUuidOfPage(this.pageName);
15515
+ const uuid = this.viewContext.getUuidOfPage(this.pageName);
15516
15516
  // this.model = await this.viewContext.load(this.uuid);
15517
- const change = await this.viewContext.load2(this.uuid);
15517
+ const change = await this.viewContext.load2(uuid);
15518
15518
  this.componentModelLoaded = true;
15519
+ this.uuid = uuid;
15519
15520
  this.model = change.result;
15520
15521
  if (this.model.widgets) {
15521
- this.handleChangeWidgets(this.model.widgets);
15522
+ // grids are already loaded in setUuid()
15523
+ this.handleChangeWidgets(this.model.widgets, true);
15522
15524
  }
15523
15525
  }
15524
15526
  async executeUiAction(uiAction, options) {
@@ -15809,13 +15811,15 @@ class SmartComponentApiClient {
15809
15811
  this.model = change.value;
15810
15812
  }
15811
15813
  }
15812
- handleChangeWidgets(changedWidgets) {
15814
+ handleChangeWidgets(changedWidgets, skipGrid = false) {
15813
15815
  let widgets = this.getWidgets();
15814
15816
  changedWidgets.forEach((key) => {
15815
15817
  const reference = widgets.get(key);
15816
15818
  if (reference instanceof SmartGridComponent) {
15817
15819
  this.setupGridServices(reference);
15818
- reference.refresh();
15820
+ if (!skipGrid) {
15821
+ reference.refresh();
15822
+ }
15819
15823
  }
15820
15824
  else if (reference instanceof SmarttreeGenericService) {
15821
15825
  reference.initialize();