* When using the native table in Safari, sticky footer cells do not stick. The only way to stick * footer rows is to apply sticky styling to the tfoot container. This should only be done if * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from * the
(tableElement: Element, stickyStates: boolean[])
| 308 | * the tfoot element. |
| 309 | */ |
| 310 | updateStickyFooterContainer(tableElement: Element, stickyStates: boolean[]) { |
| 311 | if (!this._isNativeHtmlTable) { |
| 312 | return; |
| 313 | } |
| 314 | |
| 315 | // Coalesce with other sticky updates (and potentially other changes like column resize). |
| 316 | afterNextRender( |
| 317 | { |
| 318 | write: () => { |
| 319 | const tfoot = tableElement.querySelector('tfoot')!; |
| 320 | |
| 321 | if (tfoot) { |
| 322 | if (stickyStates.some(state => !state)) { |
| 323 | this._removeStickyStyle(tfoot, ['bottom']); |
| 324 | } else { |
| 325 | this._addStickyStyle(tfoot, 'bottom', 0, false); |
| 326 | } |
| 327 | } |
| 328 | }, |
| 329 | }, |
| 330 | { |
| 331 | injector: this._tableInjector, |
| 332 | }, |
| 333 | ); |
| 334 | } |
| 335 | |
| 336 | /** Triggered by the table's OnDestroy hook. */ |
| 337 | destroy() { |
no test coverage detected