Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How may I change the page size using solid.js? #5131

Unanswered
pdenapo asked this question in Q&A
Discussion options

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)

You must be logged in to vote

Replies: 1 comment

Comment options

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 🤔

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /