Skip to content

feat(components): let apps control data table sorting, paging and rows - #19

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/data-table-control
Nov 25, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
feat/data-table-control

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

Grus lost features when it moved to the Material 3 data table. This PR lets apps take those back without changing what existing tables do.

  • Sorting can be controlled by the app (v-model:sort-by, v-model:sort-desc). With serverSort the table keeps the order it is given, for example when the sort comes from the URL.
  • A column can define sortValue to order by a derived value, such as an age or a numeric timestamp.
  • Paging: pageSizes sets the options, and paginate={false} shows all rows without the footer.
  • rowAttrs adds attributes or classes to each body row, such as data-test.

Every option is optional; the defaults keep today's behaviour. The cell slot naming is unchanged and is now documented in the component's JSDoc. The playground navigation page has a second table that shows the new options.

Verification

Lint, typecheck, the full test suite (288 tests), prepack, check:dist and the playground build all pass.

Apps can now own the sort state (v-model:sort-by, v-model:sort-desc),
keep the parent's order with serverSort, order by a column sortValue,
set the page sizes, turn paging off and add attributes to each row.
All options are optional; the defaults keep the current behaviour.
@TheMeinerLP
TheMeinerLP merged commit 7f0157a into main Nov 25, 2026
4 checks passed
@TheMeinerLP
TheMeinerLP deleted the feat/data-table-control branch November 25, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant