fix: call parent ngOnDestroy in dynamic form control container - #4644
Merged
tdonohue merged 1 commit intoSep 9, 2025
Merged
Conversation
jlipka
marked this pull request as ready for review
August 20, 2025 08:15
tdonohue
self-requested a review
August 20, 2025 21:56
Contributor
|
Successfully created backport PR for |
Contributor
|
Successfully created backport PR for |
Contributor
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Fixes #4645
Description
The 'DsDynamicFormControlContainerComponent' extends the 'DynamicFormControlContainerComponent', which comes from a third-party library (ng-dynamic-forms). When navigating away from a form that uses this component, any existing subscriptions are now removed and the default behavior of the lifecycle method "ngOnDestroy" is triggered again.
Instructions for Reviewers
I took memory snapshots using Firefox after navigation into a submission, click "save for later" and reopen it and looped this sequence about 10 times. The screenshot is probably not highly scientific, but it shows that there are significantly more objects and arrays in memory:

If you know of a way to illustrate the effects even better, I would be grateful if you could let me know.
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.