* Check if the header, data, or footer rows have changed what columns they want to display or * whether the sticky states have changed for the header or footer. If there is a diff, then * re-render that section.
()
| 1167 | * re-render that section. |
| 1168 | */ |
| 1169 | private _renderUpdatedColumns(): boolean { |
| 1170 | const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => { |
| 1171 | // The differ should be run for every column, even if `acc` is already |
| 1172 | // true (see #29922) |
| 1173 | const diff = !!def.getColumnsDiff(); |
| 1174 | return acc || diff; |
| 1175 | }; |
| 1176 | |
| 1177 | // Force re-render data rows if the list of column definitions have changed. |
| 1178 | const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false); |
| 1179 | if (dataColumnsChanged) { |
| 1180 | this._forceRenderDataRows(); |
| 1181 | } |
| 1182 | |
| 1183 | // Force re-render header/footer rows if the list of column definitions have changed. |
| 1184 | const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false); |
| 1185 | if (headerColumnsChanged) { |
| 1186 | this._forceRenderHeaderRows(); |
| 1187 | } |
| 1188 | |
| 1189 | const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false); |
| 1190 | if (footerColumnsChanged) { |
| 1191 | this._forceRenderFooterRows(); |
| 1192 | } |
| 1193 | |
| 1194 | return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged; |
| 1195 | } |
| 1196 | |
| 1197 | /** |
| 1198 | * Switch to the provided data source by resetting the data and unsubscribing from the current |
no test coverage detected