Skip to content

Commit

Permalink
perf: only detect changes in rows on real changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spike-rabbit committed Mar 27, 2024
1 parent 98bf5d4 commit 561d17c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ export class DataTableRowWrapperComponent<TRow> implements DoCheck, OnInit {
ngDoCheck(): void {
if (this.disableCheck) {
const isRowDisabled = this.disableCheck(this.row);
this.disable$.next(isRowDisabled);
this.cd.markForCheck();
if (isRowDisabled !== this.disable$.value) {
this.disable$.next(isRowDisabled);
this.cd.markForCheck();
}
}

if (this.rowDiffer.diff(this.row)) {
this.rowContext.row = this.row;
this.groupContext.group = this.row;
Expand Down

0 comments on commit 561d17c

Please sign in to comment.