fix(ivy): creation mode not run on view detached from change detection (#29741)
Fixes the creation mode block not being run on components which have been detached from change detection. This PR resolves FW-1217. Fixes #29645. PR Close #29741
This commit is contained in:

committed by
Igor Minar

parent
cb9ee3411f
commit
98cf3e8fcd
@ -1292,8 +1292,9 @@ export function componentRefresh(adjustedElementIndex: number): void {
|
||||
const hostView = getComponentViewByIndex(adjustedElementIndex, lView);
|
||||
ngDevMode && assertNodeType(lView[TVIEW].data[adjustedElementIndex] as TNode, TNodeType.Element);
|
||||
|
||||
// Only attached CheckAlways components or attached, dirty OnPush components should be checked
|
||||
if (viewAttachedToChangeDetector(hostView) &&
|
||||
// Only components in creation mode, attached CheckAlways
|
||||
// components or attached, dirty OnPush components should be checked
|
||||
if ((viewAttachedToChangeDetector(hostView) || isCreationMode(lView)) &&
|
||||
hostView[FLAGS] & (LViewFlags.CheckAlways | LViewFlags.Dirty)) {
|
||||
syncViewWithBlueprint(hostView);
|
||||
checkView(hostView, hostView[CONTEXT]);
|
||||
|
Reference in New Issue
Block a user