Skip to content

fix(action-strip): Assign parent to not destroy on DOM move. #15940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 19.2.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
parentComponentRef = await parent?.ngElementStrategy[ComponentRefKey];
parentAnchor = parentComponentRef?.instance.anchor;
}

} else if ((parent as any)?.__componentRef) {
this.angularParent = (parent as any).__componentRef;
parentInjector = this.angularParent.injector;
Original file line number Diff line number Diff line change
@@ -279,6 +279,9 @@ export class IgxActionStripComponent implements IgxActionStripToken, AfterConten
* ```
*/
public show(context?: any): void {
if(!this._originalParent) {
this._originalParent = this._viewContainer.element.nativeElement?.parentElement;
}
this.hidden = false;
if (!context) {
return;
Original file line number Diff line number Diff line change
@@ -147,7 +147,7 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
const context = this.strip.context;
const grid = context.grid;
grid.deleteRow(context.key);

this.grid.cdr.detectChanges();
this.strip.hide();
}


Unchanged files with check annotations Beta

this.colsWidth = event.target.value;
}
public onColEnter(event: IDropBaseEventArgs, rowIndex, colIndex) {

Check warning on line 170 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'event' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'event' is defined but never used. Allowed unused args must match /^_/u
this.collection[rowIndex][colIndex].hovered = true;
}
public onColLeave(event: IDropBaseEventArgs, rowIndex, colIndex) {

Check warning on line 174 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'event' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 174 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'event' is defined but never used. Allowed unused args must match /^_/u
this.collection[rowIndex][colIndex].hovered = false;
}
this.resizeVisible = true;
}
public onBlur(event, rowIndex, colIndex) {

Check warning on line 235 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'event' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 235 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'event' is defined but never used. Allowed unused args must match /^_/u
this.cellSelected = null;
this.collection[rowIndex][colIndex].selected = false;
this.resizeVisible = false;
event.target.setPointerCapture(event.pointerId);
}
public pointerMoveResizeLeft(event, cellRef, rowIndex, colIndex) {

Check warning on line 250 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'rowIndex' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 250 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'rowIndex' is defined but never used. Allowed unused args must match /^_/u
if (this.dragStarted) {
const curDistance = this.dragStartX - event.pageX;
const minIncrease = -this.curResizedCell.colSpan;
}
}
public pointerMoveResizeRight(event, cellRef, rowIndex, colIndex) {

Check warning on line 262 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'rowIndex' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 262 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'cellRef' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 262 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'rowIndex' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 262 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'cellRef' is defined but never used. Allowed unused args must match /^_/u
if (this.dragStarted) {
const curDistance = event.pageX - this.dragStartX;
const maxIncrease = this.colsCount - (colIndex + this.curResizedCell.colSpan);
}
}
public pointerUpResizeRight(event, cellRef, rowIndex, colIndex) {

Check warning on line 271 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'cellRef' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 271 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'event' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 271 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'cellRef' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 271 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'event' is defined but never used. Allowed unused args must match /^_/u
this.dragStarted = false;
this.resizeVisible = false;
this.colSpanIncrease = 0;
}
public pointerUpResizeLeft(event, cellRef, targetRowIndex, targetColIndex) {

Check warning on line 351 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (20.x)

'event' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 351 in src/app/grid-multi-row-layout-config/grid-mrl-config.sample.ts

GitHub Actions / run-tests (22.x)

'event' is defined but never used. Allowed unused args must match /^_/u
this.dragStarted = false;
this.resizeVisible = false;
return `${this.remoteService.url}?$count=true&$skip=${state.startIndex}&$top=${chunkSize}`;
};
// eslint-disable-next-line prefer-spread
this.localItems = Array.apply(null, { length: 2000 }).map((e, i) => ({

Check warning on line 41 in src/app/drop-down/drop-down-virtual/drop-down-virtual.component.ts

GitHub Actions / run-tests (20.x)

'e' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 41 in src/app/drop-down/drop-down-virtual/drop-down-virtual.component.ts

GitHub Actions / run-tests (22.x)

'e' is defined but never used. Allowed unused args must match /^_/u
name: `Item ${i + 1}`,
id: i
}));