Skip to content

Commit a8642fd

Browse files
MKirovaMKirova
authored andcommitted
fix(igxGridRow): On destroy check for still shown action strip.
1 parent fbd1785 commit a8642fd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,6 @@ 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-
}
285282
this.hidden = false;
286283
if (!context) {
287284
return;

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

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

projects/igniteui-angular/src/lib/grids/row.directive.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ export class IgxRowDirective implements DoCheck, AfterViewInit, OnDestroy {
492492
* @internal
493493
*/
494494
public ngOnDestroy() {
495+
// if action strip is shown here but row is about to be destroyed, hide it.
496+
if (this.grid.actionStrip && this.grid.actionStrip.context === this) {
497+
this.grid.actionStrip.hide();
498+
}
495499
this.destroy$.next(true);
496500
this.destroy$.complete();
497501
}

0 commit comments

Comments
 (0)