@smartbit4all/ng-client 3.3.235 → 3.3.236

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.
@@ -14582,8 +14582,6 @@ class SmartFilterEditorContentComponent {
14582
14582
  this._destroy$.complete();
14583
14583
  }
14584
14584
  setupSimpleFilter() {
14585
- this.simpleFilterVcRef?.clear();
14586
- this.simpleFilterRef?.destroy();
14587
14585
  if (!this.simpleFilterVcRef) {
14588
14586
  return;
14589
14587
  }
@@ -14631,6 +14629,18 @@ class SmartFilterEditorContentComponent {
14631
14629
  useOnBlurEvent: true,
14632
14630
  widgets,
14633
14631
  };
14632
+ if (this.simpleFilterRef?.instance) {
14633
+ // we already have a SmartFormComponent, use that
14634
+ let comp = this.simpleFilterRef?.instance;
14635
+ if (comp.smartForm && deepEqual(comp.smartForm, smartForm)) {
14636
+ // there's no structural change, don't recreate SmartFormComponent
14637
+ comp.smartForm.componentModel = { data: model };
14638
+ comp.constructForm();
14639
+ return;
14640
+ }
14641
+ }
14642
+ this.simpleFilterVcRef?.clear();
14643
+ this.simpleFilterRef?.destroy();
14634
14644
  this.simpleFilterRef = this.cfService.createComponent(this.simpleFilterVcRef, SmartformComponent, new Map([['smartForm', smartForm]]));
14635
14645
  this.subsrcibeSimpleFormChildrenEvents();
14636
14646
  }