* 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
()
| 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 |
no test coverage detected