fix(angular): unsubscribe from jsonForm state subscription by LukasBoll · Pull Request #2377 · eclipsesource/jsonforms

@LukasBoll

Previously, the subscription to the jsonForm state in Angular was never unsubscribed.
With this commit, all subscriptions will be unsubscribed when the component is destroyed.

Closes eclipsesource#2354

lucas-koehler

@lucas-koehler

lucas-koehler

laurentgrangier pushed a commit to codeblock-gmbh/jsonforms that referenced this pull request

Nov 26, 2024
…lipsesource#2377)

Previously, subscriptions to the JSON Forms state in Angular were never removed when renderer components are destroyed.
With this commit, all subscriptions will be unsubscribed when the component is destroyed.
The base renderer offers an addSubscription method to register one or multiple subscriptions
to automatically be unsubscribed on destroy. With this, extending renderers do not need to
implement the unsubscribe again.

Closes eclipsesource#2354

Co-authored-by: Lucas Koehler <lkoehler@eclipsesource.com>