-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Table): add support for pagination & initialState #3065
base: v3
Are you sure you want to change the base?
Conversation
@@ -169,6 +175,8 @@ const tableApi = useVueTable({ | |||
...(props.expandedOptions || {}), | |||
getExpandedRowModel: getExpandedRowModel(), | |||
onExpandedChange: updaterOrValue => valueUpdater(updaterOrValue, expandedState), | |||
getPaginationRowModel: getPaginationRowModel(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not break all existing examples? I already tried this when I made the component but this enables the pagination just by passing getPaginationRowModel
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the examples locally and they're working as expected. Can you elaborate more on how they break?
commit: |
One thing to note is that this works for Client Side Pagination; for Server-Side pagination, one would need to pass This made me think that we should let the table component accept all of What do you think? @benjamincanac |
Yes that would be better indeed, initially I was planning to add props one by one to document each feature. |
Would you like me to do it in this PR? |
π Linked issue
Part of #2441
β Type of change
π Description
This adds Pagination support for the table component. I've been waiting on #2654 but it's been a draft for some time. I've also added support for initialState to allow users to pass default options to the table, such as page size.
π Checklist