Skip to content

Commit 561d17c

Browse files
committed
perf: only detect changes in rows on real changes
1 parent 98bf5d4 commit 561d17c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ export class DataTableRowWrapperComponent<TRow> implements DoCheck, OnInit {
113113
ngDoCheck(): void {
114114
if (this.disableCheck) {
115115
const isRowDisabled = this.disableCheck(this.row);
116-
this.disable$.next(isRowDisabled);
117-
this.cd.markForCheck();
116+
if (isRowDisabled !== this.disable$.value) {
117+
this.disable$.next(isRowDisabled);
118+
this.cd.markForCheck();
119+
}
118120
}
121+
119122
if (this.rowDiffer.diff(this.row)) {
120123
this.rowContext.row = this.row;
121124
this.groupContext.group = this.row;

0 commit comments

Comments
 (0)