Replies: 1 comment
|
Checked TableLayout.ts to see how the footer is positioned, and there is nothing sticky about it, tablefooter goes through the exact same buildRowGroup call as tablebody: case 'tablebody':
case 'tablefooter': {
let body = this.buildRowGroup(y, node)
y = body.layoutInfo.rect.maxY + this.gap
...
layoutNodes.push(body)
break
}Its y position is just whatever the running total is after the body, there is no isSticky flag or bottom anchoring logic applied to it the way there is for isStickyColumn on individual columns elsewhere in the same file. So no, there is currently no built in way to get an anchored or sticky footer, what you are seeing is the actual intended layout behavior today, not something misconfigured on your end. If you want to fake it yourself in the meantime, the same approach people use for sticky columns in this layout (setting layoutInfo.isSticky and allowOverflow on the footer's row group node in a TableLayout subclass, then applying position: sticky; bottom: 0 in CSS on that row group) should work the same way for a footer, since the underlying virtualizer mechanism for sticky positioning is not column specific, it just is not wired up for tablefooter out of the box. Might be worth filing this as its own feature request, since as far as I can tell there is no tracking issue for a sticky footer specifically. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am experiencing an issue with the TableView footer behavior.
Currently, the TableFooter is rendered immediately after the last row of the table. This means that when the table contains many rows, the footer is only visible after scrolling to the very bottom of the content.
Conversely, when the table contains only a few rows and the content does not fill the available height of the table container, the footer is rendered directly below the last row instead of being aligned to the bottom of the table. This leaves unused space beneath the footer and creates an inconsistent layout, as shown in the following screenshot:
For summary information such as totals, balances, or aggregated values, it would be more useful if the footer could be displayed at the bottom of the table container and remain visible while scrolling, similar to a sticky footer.
Would it be possible to add support for a sticky footer or a footer that is anchored to the bottom of the TableView container?
Thanks
All reactions