@recursyve/nice-ui-kit.v2 13.2.0-beta.96 → 13.2.0-beta.97

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.
@@ -3192,15 +3192,17 @@ class NiceBaseFormComponent {
3192
3192
  this.loading = false;
3193
3193
  // tslint:disable-next-line:no-output-native
3194
3194
  this.submit = new EventEmitter();
3195
+ this.unsubscribeAll$ = new Subject();
3195
3196
  this.propagate = () => { };
3196
3197
  }
3197
3198
  ngOnInit() {
3198
- this.valueChangeSub$ = this.formGroup.valueChanges.subscribe(() => {
3199
+ this.formGroup.valueChanges.pipe(takeUntil(this.unsubscribeAll$)).subscribe(() => {
3199
3200
  this.onValueChange(this.formGroup.getRawValue());
3200
3201
  });
3201
3202
  }
3202
3203
  ngOnDestroy() {
3203
- this.valueChangeSub$?.unsubscribe();
3204
+ this.unsubscribeAll$?.next();
3205
+ this.unsubscribeAll$?.complete();
3204
3206
  }
3205
3207
  registerOnChange(fn) {
3206
3208
  this.propagate = fn;