@smartbit4all/ng-client 3.3.16 → 3.3.18

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.
@@ -13343,30 +13343,33 @@ class SmartFilterEditorContentComponent {
13343
13343
  }
13344
13344
  }
13345
13345
  subsrcibeSimpleFormChildrenEvents() {
13346
- this.simpleFilterFormChildren?.first.onBlurSubject
13347
- ?.pipe(takeUntil(this._destroy$))
13348
- .subscribe(() => {
13349
- this.saveFilter();
13350
- });
13351
- // this.simpleFilterFormChildren?.first.sophisticatedValueChange
13352
- // ?.pipe(takeUntil(this._destroy$))
13353
- // .subscribe((change) => {
13354
- // if (change.kind === 'selection') {
13355
- // this.saveFilter();
13356
- // }
13357
- // });
13346
+ if (!this.filterOnBlurSub) {
13347
+ this.filterOnBlurSub = this.simpleFilterFormChildren.first.onBlurSubject.pipe(takeUntil(this._destroy$)).subscribe(() => {
13348
+ this.saveFilter();
13349
+ });
13350
+ }
13351
+ if (!this.filterValueChangeSub) {
13352
+ this.filterValueChangeSub =
13353
+ this.simpleFilterFormChildren.first.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
13354
+ if (change.kind === 'selection') {
13355
+ this.saveFilter();
13356
+ }
13357
+ });
13358
+ }
13358
13359
  }
13359
13360
  subscribeEditorFormChildrenEvents() {
13360
- this.formChildren?.first.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
13361
- this.save();
13362
- });
13363
- this.formChildren?.first.sophisticatedValueChange
13364
- ?.pipe(takeUntil(this._destroy$))
13365
- .subscribe((change) => {
13366
- if (change.key === 'expressionData.currentOperation') {
13361
+ if (!this.filterOnBlurSub) {
13362
+ this.filterOnBlurSub = this.formChildren.first.onBlurSubject.pipe(takeUntil(this._destroy$)).subscribe(() => {
13367
13363
  this.save();
13368
- }
13369
- });
13364
+ });
13365
+ }
13366
+ if (!this.filterValueChangeSub) {
13367
+ this.filterValueChangeSub = this.formChildren.first.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
13368
+ if (change.key === 'expressionData.currentOperation') {
13369
+ this.save();
13370
+ }
13371
+ });
13372
+ }
13370
13373
  }
13371
13374
  // smartFilterChangeSubscription?: Subscription;
13372
13375
  // smartFilterSophisticatedChangeSubscription?: Subscription;
@@ -13379,6 +13382,8 @@ class SmartFilterEditorContentComponent {
13379
13382
  ngOnDestroy() {
13380
13383
  this._destroy$.next();
13381
13384
  this._destroy$.complete();
13385
+ this.filterOnBlurSub.unsubscribe();
13386
+ this.filterValueChangeSub.unsubscribe();
13382
13387
  }
13383
13388
  setupSimpleFilter() {
13384
13389
  let widgets = [];
@@ -13420,7 +13425,7 @@ class SmartFilterEditorContentComponent {
13420
13425
  useOnBlurEvent: true,
13421
13426
  widgets,
13422
13427
  };
13423
- if (!deepEqual(smartForm, this.simpleFilterForm)) {
13428
+ if (!deepEqual(smartForm.widgets, this.simpleFilterForm?.widgets)) {
13424
13429
  this.simpleFilterForm = smartForm;
13425
13430
  }
13426
13431
  }