MCPcopy Create free account
hub / github.com/angular/components / _addStickyColumnStyles

Method _addStickyColumnStyles

src/cdk/table/table.ts:1287–1303  ·  view source on GitHub ↗

Adds the sticky column styles for the rows according to the columns' stick states.

(rows: HTMLElement[], rowDef: BaseRowDef)

Source from the content-addressed store, hash-verified

1285
1286 /** Adds the sticky column styles for the rows according to the columns' stick states. */
1287 private _addStickyColumnStyles(rows: HTMLElement[], rowDef: BaseRowDef) {
1288 const columnDefs = Array.from(rowDef?.columns || []).map(columnName => {
1289 const columnDef = this._columnDefsByName.get(columnName);
1290 if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1291 throw getTableUnknownColumnError(columnName);
1292 }
1293 return columnDef!;
1294 });
1295 const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);
1296 const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);
1297 this._stickyStyler.updateStickyColumns(
1298 rows,
1299 stickyStartStates,
1300 stickyEndStates,
1301 !this.fixedLayout || this._forceRecalculateCellWidths,
1302 );
1303 }
1304
1305 /** Gets the list of rows that have been rendered in the row outlet. */
1306 _getRenderedRows(rowOutlet: RowOutlet): HTMLElement[] {

Callers 1

Calls 3

updateStickyColumnsMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected