fix(forms): ensure OnPush ancestors are marked dirty when the promise resolves#39879
fix(forms): ensure OnPush ancestors are marked dirty when the promise resolves#39879arturovt wants to merge 1 commit intoangular:masterfrom arturovt:fix/10816
Conversation
… resolves Currently, `ngModel` calls` setValue` after the `resolvedPromise` is resolved. This means that change detection will not be run for this component if it's inside an OnPush component, because it is not marked as dirty. PR Close #10816
|
Hey @arturovt, sorry for the delay in answering! Just wanted to mention that this PR is likely introducing a relatively big breaking change from behavior standpoint where more views would be processed by change detection. We will need to look into this more and see if there similar approaches and/or whether we need to have a flag to opt-in/opt-out of this behavior. I will keep this thread updated, but I don't have any ETA at this moment. Thank you. |
|
Hi @arturovt, @AndrewKushnir and I investigated this today. Here's a summary of our findings:
Could you please rebase this PR so we can proceed with merging? |
|
Hey @atscott . I’ll reopen the PR since I have another fork. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
PR Type
What is the current behavior?
Issue Number: #10816
Currently,
ngModelcallssetValueafter theresolvedPromiseis resolved. This means that change detection will not be run for this component if it's inside an OnPush component, because it is not marked as dirty.What is the new behavior?
Does this PR introduce a breaking change?