Skip to content

Commit 01683e7

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Move strip handling after parentComponentRef is populated.
1 parent 5ac7a0d commit 01683e7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

projects/igniteui-angular-elements/src/app/custom-strategy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
120120
if (parent?.ngElementStrategy) {
121121
this.angularParent = parent.ngElementStrategy.angularParent;
122122

123-
// action strip is reused in row island child grid
124-
// assign parent so it's not destroyed on detach/attach.
125-
if (element.tagName.toLocaleLowerCase() === 'igc-action-strip') {
126-
this.angularParent = (parent.ngElementStrategy as any).componentRef;
127-
}
128-
129123
this.parentElement = new WeakRef(parent);
130124
let parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
131125
parentInjector = parentComponentRef?.injector;
@@ -138,6 +132,12 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
138132
parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
139133
parentAnchor = parentComponentRef?.instance.anchor;
140134
}
135+
136+
// action strip is reused for all rows
137+
// assign parent so it's not destroyed on detach/attach.
138+
if (element.tagName.toLocaleLowerCase() === 'igc-action-strip' || configParent.selector === 'igc-action-strip') {
139+
this.angularParent = parentComponentRef;
140+
}
141141
} else if ((parent as any)?.__componentRef) {
142142
this.angularParent = (parent as any).__componentRef;
143143
parentInjector = this.angularParent.injector;

0 commit comments

Comments
 (0)