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

Method updateStickyFooterRowStyles

src/cdk/table/table.ts:857–877  ·  view source on GitHub ↗

* Updates the footer sticky styles. First resets all applied styles with respect to the cells * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is * automatically called when the footer row changes its displayed set of columns, or if its * sticky in

()

Source from the content-addressed store, hash-verified

855 * of these events.
856 */
857 updateStickyFooterRowStyles(): void {
858 const footerRows = this._getRenderedRows(this._footerRowOutlet);
859
860 // Hide the tfoot element if there are no footer rows. This is necessary to satisfy
861 // overzealous a11y checkers that fail because the `rowgroup` element does not contain
862 // required child `row`.
863 if (this._isNativeHtmlTable) {
864 const tfoot = closestTableSection(this._footerRowOutlet, 'tfoot');
865 if (tfoot) {
866 tfoot.style.display = footerRows.length ? '' : 'none';
867 }
868 }
869
870 const stickyStates = this._footerRowDefs.map(def => def.sticky);
871 this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);
872 this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');
873 this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);
874
875 // Reset the dirty state of the sticky input change since it has been used.
876 this._footerRowDefs.forEach(def => def.resetStickyChanged());
877 }
878
879 /**
880 * Updates the column sticky styles. First resets all applied styles with respect to the cells

Callers 2

_checkStickyStatesMethod · 0.95

Calls 6

_getRenderedRowsMethod · 0.95
closestTableSectionFunction · 0.85
stickRowsMethod · 0.80
resetStickyChangedMethod · 0.65

Tested by

no test coverage detected