Skip to content

Commit f169621

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

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
@@ -458,6 +458,10 @@ export class IgxRowDirective implements DoCheck, AfterViewInit, OnDestroy {
458458
* @internal
459459
*/
460460
public ngOnDestroy() {
461+
// if action strip is shown here but row is about to be destroyed, hide it.
462+
if (this.grid.actionStrip && this.grid.actionStrip.context === this) {
463+
this.grid.actionStrip.hide();
464+
}
461465
this.destroy$.next(true);
462466
this.destroy$.complete();
463467
}

0 commit comments

Comments
 (0)