forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(forms): clear parent when removing controls (angular#29517)
When a control is removed from a FormGroup, or replaced by another control, that control's parent wasn't cleared. Apart from leaving the parent reference on the removed control, this also made it impossible for the control to react on its removal in an overridden setParent. This change introduces an unregisterControl method, symmetric to registerControl, which is called to clear a control's parent (set to null) when it's removed or replaced. PR Close angular#29517
- Loading branch information
Showing
2 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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