Skip to content

Conversation

@LukasBoll
Copy link
Contributor

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 #2354

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
@netlify
Copy link

netlify bot commented Sep 15, 2024

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 481c14d
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/67079601a9b1cf0008cd0653
😎 Deploy Preview https://deploy-preview-2377--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coveralls
Copy link

coveralls commented Sep 15, 2024

Coverage Status

coverage: 81.728% (-0.005%) from 81.733%
when pulling 481c14d on LukasBoll:fix/angular_unsubscribe
into 8c4b2f0 on eclipsesource:master.

@sdirix sdirix requested review from lucas-koehler and removed request for lucas-koehler October 9, 2024 09:39
Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR @LukasBoll . The changes already look pretty good to me ✨
I have just two minor suggestions inline to make the base renderer's subscriptions protected.

@lucas-koehler lucas-koehler removed the request for review from sdirix October 10, 2024 08:53
@lucas-koehler lucas-koehler merged commit 1feaf0b into eclipsesource:master Oct 10, 2024
8 checks passed
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

abstract-control (angular) state subscription is not cleared

3 participants