Skip to content

Commit

Permalink
fix(cdk/table): run differ for all columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Seguin committed Nov 13, 2024
1 parent 5dc2de2 commit 561f6e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cdk/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,10 @@ export class CdkTable<T>
* re-render that section.
*/
private _renderUpdatedColumns(): boolean {
const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => acc || !!def.getColumnsDiff();
const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => {
const diff = !!def.getColumnsDiff();
return acc || diff;
};

// Force re-render data rows if the list of column definitions have changed.
const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);
Expand Down

0 comments on commit 561f6e2

Please sign in to comment.