Repository navigation
feat: pivot table option to pin the totals row at the bottom (totals_row_position) - #9915
Merged
Merged
Conversation
Adds a totalsRowPosition setting (top by default, or bottom) for pivot and flat tables. The totals row stays tanstack row "0" in the data; when pinned to the bottom it is skipped in the virtualized body and rendered in a sticky tfoot, so expansion indices, click-to-filter and formatting are unaffected. The setting is exposed in the pivot toolbar, persisted in the URL (totals_row_position), the explore preset and bookmark protos, and the canvas pivot/table YAML (totals_row_position).
AdityaHegde
reviewed
Sep 22, 2026
| </td> | ||
| {/each} | ||
| </tr> | ||
| {#if !(totalsRowAtBottom && row.index === 0)} |
Collaborator
There was a problem hiding this comment.
It feels weird to treat the first row as totals row regardless of totalsRowAtBottom. How about getting totals row separately instead of being part of rows? If it is a lot of refactor, a follow up will suffice.
Collaborator
Author
There was a problem hiding this comment.
its a slightly med to large refactor, will do as a follow up to have just a clean refactor for that.
AdityaHegde
approved these changes
Sep 22, 2026
8 tasks
nishantmonu51
added a commit
that referenced
this pull request
Sep 23, 2026
…_row_position`) (#9915) * feat: pivot table option to pin the totals row at the bottom Adds a totalsRowPosition setting (top by default, or bottom) for pivot and flat tables. The totals row stays tanstack row "0" in the data; when pinned to the bottom it is skipped in the virtualized body and rendered in a sticky tfoot, so expansion indices, click-to-filter and formatting are unaffected. The setting is exposed in the pivot toolbar, persisted in the URL (totals_row_position), the explore preset and bookmark protos, and the canvas pivot/table YAML (totals_row_position). * chore: restore package-lock.json (unintended local drift) (cherry picked from commit cd3aec9)
mahdi13
added a commit
to inkitt/rill
that referenced
this pull request
Sep 28, 2026
Conflicts: - FlatTable.svelte, NestedTable.svelte: main moved the row markup into a pivotRow snippet (totals row pinning, rilldata#9915). Took main's snippet and applied the PIVOT_TOTALS_ROW_ID check there, and updated the comment that described the totals row as tanstack row "0". - pivot-click-to-filter.spec.ts: main rewrote the setup for the unified filter manager (rilldata#9746). Took main's version and switched its row ids from positional to value-based again.
mahdi13
added a commit
to inkitt/rill
that referenced
this pull request
Sep 28, 2026
Conflicts: - FlatTable.svelte, NestedTable.svelte: main moved the row markup into a pivotRow snippet (totals row pinning, rilldata#9915). Took main's snippet and applied the PIVOT_TOTALS_ROW_ID check there, and updated the comment that described the totals row as tanstack row "0". - pivot-click-to-filter.spec.ts: main rewrote the setup for the unified filter manager (rilldata#9746). Took main's version and switched its row ids from positional to value-based again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a user-facing option to pin the pivot totals row at the bottom of the table instead of under the header.
totalsRowPositionpivot state (topby default, orbottom), exposed as a Top/Bottom select next to the "Total row" checkbox inPivotToolbar.svelte."0"in the data. When pinned to the bottom,NestedTable.svelteandFlatTable.svelteskip it in the virtualized body and render it in a sticky<tfoot>via a shared{#snippet pivotRow}, so expansion indices, click-to-filter, selection and heatmap domains are unaffected. Positionalnth-of-typetotals selectors are replaced by a.totals-rowclass.totals_row_position=bottom, omitted when top), theExplorePresetproto and the bookmarkDashboardStateproto.totals_row_positionin YAML and show it in the inspector when the totals row is visible; project schema and component docs updated.defaultsare out of scope since the parser does not read any pivot preset fields today.url-state-variations.spec.ts, and the pivot e2e run-through now toggles the position and asserts the footer row and URL param.Checklist: