Skip to content

Commit 5ac7a0d

Browse files
MKirovaMKirova
authored andcommitted
fix(action-strip): Assign parent to not destroy on DOM move.
1 parent 13132d7 commit 5ac7a0d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
119119
// ngElementStrategy getter is protected and also has initialization logic, though that should be safe at this point
120120
if (parent?.ngElementStrategy) {
121121
this.angularParent = parent.ngElementStrategy.angularParent;
122+
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+
122129
this.parentElement = new WeakRef(parent);
123130
let parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
124131
parentInjector = parentComponentRef?.injector;

0 commit comments

Comments
 (0)