Skip to content

Commit a307ceb

Browse files
MKirovaMKirova
authored andcommitted
fix(action-strip): Assign parent to not destroy on DOM move.
1 parent bb28024 commit a307ceb

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
@@ -114,6 +114,13 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
114114
// ngElementStrategy getter is protected and also has initialization logic, though that should be safe at this point
115115
if (parent?.ngElementStrategy) {
116116
this.angularParent = parent.ngElementStrategy.angularParent;
117+
118+
// action strip is reused in row island child grid
119+
// assign parent so it's not destroyed on detach/attach.
120+
if (element.tagName.toLocaleLowerCase() === 'igc-action-strip') {
121+
this.angularParent = (parent.ngElementStrategy as any).componentRef;
122+
}
123+
117124
this.parentElement = new WeakRef(parent);
118125
let parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
119126
parentInjector = parentComponentRef?.injector;

0 commit comments

Comments
 (0)