diff --git a/src/cdk/table/table.ts b/src/cdk/table/table.ts index f287b9adb8b9..08dac1d5eaf2 100644 --- a/src/cdk/table/table.ts +++ b/src/cdk/table/table.ts @@ -1084,7 +1084,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);