* 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.
()
| 1185 | * re-render that section. |
| 1186 | */ |
| 1187 | private _renderUpdatedColumns(): boolean { |
| 1188 | const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => { |
| 1189 | // The differ should be run for every column, even if `acc` is already |
| 1190 | // true (see #29922) |
| 1191 | const diff = !!def.getColumnsDiff(); |
| 1192 | return acc || diff; |
| 1193 | }; |
| 1194 | |
| 1195 | // Force re-render data rows if the list of column definitions have changed. |
| 1196 | const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false); |
| 1197 | if (dataColumnsChanged) { |
| 1198 | this._forceRenderDataRows(); |
| 1199 | } |
| 1200 | |
| 1201 | // Force re-render header/footer rows if the list of column definitions have changed. |
| 1202 | const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false); |
| 1203 | if (headerColumnsChanged) { |
| 1204 | this._forceRenderHeaderRows(); |
| 1205 | } |
| 1206 | |
| 1207 | const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false); |
| 1208 | if (footerColumnsChanged) { |
| 1209 | this._forceRenderFooterRows(); |
| 1210 | } |
| 1211 | |
| 1212 | return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged; |
| 1213 | } |
| 1214 | |
| 1215 | /** |
| 1216 | * Switch to the provided data source by resetting the data and unsubscribing from the current |
no test coverage detected