Skip to content

Commit fbd1785

Browse files
MKirovaMKirova
authored andcommitted
fix(action-strip): Fix timing issues.
1 parent 01683e7 commit fbd1785

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
@@ -119,7 +119,6 @@ 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-
123122
this.parentElement = new WeakRef(parent);
124123
let parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
125124
parentInjector = parentComponentRef?.injector;
@@ -133,11 +132,6 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
133132
parentAnchor = parentComponentRef?.instance.anchor;
134133
}
135134

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-
}
141135
} else if ((parent as any)?.__componentRef) {
142136
this.angularParent = (parent as any).__componentRef;
143137
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)