@smartbit4all/ng-client 3.3.182 → 3.3.184

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.
@@ -15519,7 +15519,8 @@ class SmartComponentApiClient {
15519
15519
  this.uuid = uuid;
15520
15520
  this.model = change.result;
15521
15521
  if (this.model.widgets) {
15522
- this.handleChangeWidgets(this.model.widgets);
15522
+ // grids are already loaded in setUuid()
15523
+ this.handleChangeWidgets(this.model.widgets, true);
15523
15524
  }
15524
15525
  }
15525
15526
  async executeUiAction(uiAction, options) {
@@ -15810,19 +15811,25 @@ class SmartComponentApiClient {
15810
15811
  this.model = change.value;
15811
15812
  }
15812
15813
  }
15813
- handleChangeWidgets(changedWidgets) {
15814
+ handleChangeWidgets(changedWidgets, skipLoad = false) {
15814
15815
  let widgets = this.getWidgets();
15815
15816
  changedWidgets.forEach((key) => {
15816
15817
  const reference = widgets.get(key);
15817
15818
  if (reference instanceof SmartGridComponent) {
15818
15819
  this.setupGridServices(reference);
15819
- reference.refresh();
15820
+ if (!skipLoad) {
15821
+ reference.refresh();
15822
+ }
15820
15823
  }
15821
15824
  else if (reference instanceof SmarttreeGenericService) {
15822
- reference.initialize();
15825
+ if (!skipLoad) {
15826
+ reference.initialize();
15827
+ }
15823
15828
  }
15824
15829
  else if (reference instanceof SmartFilterEditorService) {
15825
- reference.load();
15830
+ if (!skipLoad) {
15831
+ reference.load();
15832
+ }
15826
15833
  }
15827
15834
  else if (reference === undefined) {
15828
15835
  console.error(`Provided reference for ${key} is undefined.`);