Skip to content

Commit

Permalink
added comment on how haveColumnConfigsChanged works
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshsharma committed Dec 8, 2023
1 parent ccf1733 commit c17695a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/components/src/table/data/table-cdk-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class TableCdkDataSource implements DataSource<TableRow> {

private cacheNewData(total: number, rows: StatefulTableRow[], request?: TableDataRequest): void {
this.cachedData = {
request: cloneDeep(request),
request: request,
rows: rows.map(TableCdkRowUtil.cloneRow),
total: total,
};
Expand Down Expand Up @@ -292,6 +292,8 @@ export class TableCdkDataSource implements DataSource<TableRow> {
return true;
}

// Check if references are equal
// Only checks if the array of columns has been modified. Not the columns themselves.
return !isEqual(request.columns, this.cachedData.request.columns);
}

Expand Down

0 comments on commit c17695a

Please sign in to comment.