Skip to content

Commit 762a5c0

Browse files
MKirovaMKirova
authored andcommitted
fix(action-strip): Fix timing issues.
1 parent 564b503 commit 762a5c0

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ 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-
118117
this.parentElement = new WeakRef(parent);
119118
let parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
120119
parentInjector = parentComponentRef?.injector;
@@ -128,11 +127,6 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
128127
parentAnchor = parentComponentRef?.instance.anchor;
129128
}
130129

131-
// action strip is reused for all rows
132-
// assign parent so it's not destroyed on detach/attach.
133-
if (element.tagName.toLocaleLowerCase() === 'igc-action-strip' || configParent.selector === 'igc-action-strip') {
134-
this.angularParent = parentComponentRef;
135-
}
136130
} else if ((parent as any)?.__componentRef) {
137131
this.angularParent = (parent as any).__componentRef;
138132
parentInjector = this.angularParent.injector;

projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ export class IgxActionStripComponent implements IgxActionStripToken, AfterConten
279279
* ```
280280
*/
281281
public show(context?: any): void {
282+
if(!this._originalParent) {
283+
this._originalParent = this._viewContainer.element.nativeElement?.parentElement;
284+
}
282285
this.hidden = false;
283286
if (!context) {
284287
return;

projects/igniteui-angular/src/lib/action-strip/grid-actions/grid-editing-actions.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
147147
const context = this.strip.context;
148148
const grid = context.grid;
149149
grid.deleteRow(context.key);
150-
150+
this.grid.cdr.detectChanges();
151151
this.strip.hide();
152152
}
153153

0 commit comments

Comments
 (0)