-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
-
I am trying to use pagination with tanstack/table using solid.js, by addapting the code for react at
https://tanstack.com/table/v8/docs/examples/react/pagination
but the code for letting the user choose the page size
<select
value={table.getState().pagination.pageSize}
onChange={e => {
table.setPageSize(Number(e.target.value))
}}
>
{[10, 20, 30, 40, 50].map(pageSize => (
Show {pageSize} rows
))}
didn't work. Even the simplest code
table.setPageSize(20)
does not work! (this could be a bug in solid-table but I'm not sure)
It seems to be a problem with reactivity. The table is unchanged after this code.
I guess that I seed to define a signal and connect it to the table, but I don't know exactly how.
It would be nice if you provide examples for using pagination in solid.js (and also in Svelte)
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Replies: 1 comment
-
Day 2 of facing similar problems. I'm trying to implement server side pagination and control pagination manually. But methods like table.getCanPreviousPage()
just doesn't seem to rerender the component 🤔
Beta Was this translation helpful? Give feedback.