From 7eb51ef58fd0a58396664beecf03dfa0c691fbca Mon Sep 17 00:00:00 2001 From: Bartosz Sekula Date: Thu, 28 Nov 2024 11:06:43 -0500 Subject: [PATCH] AAE-28801 Make "FormRulesManager.onDestroy$" available for derived classes (#10441) --- lib/core/src/lib/form/models/form-rules.model.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/src/lib/form/models/form-rules.model.ts b/lib/core/src/lib/form/models/form-rules.model.ts index 7f64e84c2f8..f257bf7d95a 100644 --- a/lib/core/src/lib/form/models/form-rules.model.ts +++ b/lib/core/src/lib/form/models/form-rules.model.ts @@ -42,7 +42,7 @@ export abstract class FormRulesManager { constructor(protected formService: FormService) {} protected formModel: FormModel; - private onDestroy$ = new Subject(); + protected onDestroy$ = new Subject(); private initialized = false; initialize(formModel: FormModel) { @@ -59,14 +59,14 @@ export abstract class FormRulesManager { if (rules) { this.formService.formRulesEvent .pipe( - filter((event) => !!event?.form?.id && event.form.id === formModel?.id), + filter((event) => !!event?.form?.id && event.form.id === this.formModel?.id), takeUntil(this.onDestroy$) ) .subscribe((event) => { this.handleRuleEvent(event, rules); }); - const onFormLoadedEvent = new FormEvent(formModel); + const onFormLoadedEvent = new FormEvent(this.formModel); const formRules = new FormRulesEvent('formLoaded', onFormLoadedEvent); this.formService.formRulesEvent.next(formRules); }