Open Ketec opened 2 months ago
Hi @Ketec , thanks for the report. That indeed seems like a bug. Would you like to contribute a fix?
I'm not set up to run it locally for tests ( or even how it is set up here). An open question also would be about the potential use cases with custom renderers that may extend this and use this.subscription for other observables.
It likely needs a separate property to ensure it's backwards compatible.
Describe the bug
https://github.com/eclipsesource/jsonforms/blob/master/packages/angular/src/library/abstract-control.ts ngOnDestroy does unsubscribe, but this.jsonFormsService.$state.subscribe is never actually assigned to the variable.
So every schema change adds new subscriptions and old ones still remain active and trigger.
Expected behavior
removed controls are unsubscribed
Steps to reproduce the issue