Skip to content

Commit

Permalink
Merge pull request #3207 from IgniteUI/nalipiev/no-checkbox-anim-scro…
Browse files Browse the repository at this point in the history
…ll-7-0

Disable checkbox animations on grid scroll
  • Loading branch information
rkaraivanov authored Nov 29, 2018
2 parents 0a17d2f + 949c46e commit 24209d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,11 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
*/
public allRowsSelected = false;

/**
* @hidden
*/
public disableTransitions = false;

/**
* @hidden
*/
Expand Down Expand Up @@ -2039,12 +2044,14 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements

private verticalScrollHandler(event) {
this.verticalScrollContainer.onScroll(event);
this.disableTransitions = true;
this.zone.run(() => {
this.cdr.detectChanges();
this.verticalScrollContainer.onChunkLoad.emit(this.verticalScrollContainer.state);
if (this.rowEditable) {
this.changeRowEditingOverlayStateOnScroll(this.rowInEditMode);
}
this.disableTransitions = false;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</ng-container>
<ng-container *ngIf="showRowCheckboxes">
<div class="igx-grid__cbx-selection">
<igx-checkbox [checked]="isSelected" (change)="onCheckboxClick($event)" disableRipple="true" [aria-label]="rowCheckboxAriaLabel"></igx-checkbox>
<igx-checkbox [checked]="isSelected" (change)="onCheckboxClick($event)" disableRipple="true" [disableTransitions]="grid.disableTransitions" [aria-label]="rowCheckboxAriaLabel"></igx-checkbox>
</div>
</ng-container>
<ng-container *ngIf="pinnedColumns.length > 0">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ng-container *ngIf="rowSelectable">
<div class="igx-grid__cbx-selection">
<igx-checkbox [checked]="isSelected" (change)="onCheckboxClick($event)" disableRipple="true" [aria-label]="rowCheckboxAriaLabel"></igx-checkbox>
<igx-checkbox [checked]="isSelected" (change)="onCheckboxClick($event)" disableRipple="true" [disableTransitions]="grid.disableTransitions" [aria-label]="rowCheckboxAriaLabel"></igx-checkbox>
</div>
</ng-container>
<ng-container *ngIf="pinnedColumns.length > 0">
Expand Down

0 comments on commit 24209d2

Please sign in to comment.