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);