From 561f6e23cba8b4da840128cd38c528a3f4506e77 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Wed, 13 Nov 2024 13:30:47 -0700 Subject: [PATCH] fix(cdk/table): run differ for all columns --- src/cdk/table/table.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cdk/table/table.ts b/src/cdk/table/table.ts index 7d0b5141a200..d25529219bf3 100644 --- a/src/cdk/table/table.ts +++ b/src/cdk/table/table.ts @@ -1085,7 +1085,10 @@ export class CdkTable * 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);