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

Method _addStickyColumnStyles

src/cdk/table/table.ts:1305–1321  ·  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

1303
1304 /** Adds the sticky column styles for the rows according to the columns' stick states. */
1305 private _addStickyColumnStyles(rows: HTMLElement[], rowDef: BaseRowDef) {
1306 const columnDefs = Array.from(rowDef?.columns || []).map(columnName => {
1307 const columnDef = this._columnDefsByName.get(columnName);
1308 if (!columnDef) {
1309 throw getTableUnknownColumnError(columnName);
1310 }
1311 return columnDef;
1312 });
1313 const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);
1314 const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);
1315 this._stickyStyler.updateStickyColumns(
1316 rows,
1317 stickyStartStates,
1318 stickyEndStates,
1319 !this.fixedLayout || this._forceRecalculateCellWidths,
1320 );
1321 }
1322
1323 /** Gets the list of rows that have been rendered in the row outlet. */
1324 _getRenderedRows(rowOutlet: RowOutlet): HTMLElement[] {

Callers 1

Calls 3

updateStickyColumnsMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected