Skip to content
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

pagination component - can't go to page '1' #142

Closed
tim-x-y-z opened this issue Jan 1, 2024 · 2 comments · Fixed by #195
Closed

pagination component - can't go to page '1' #142

tim-x-y-z opened this issue Jan 1, 2024 · 2 comments · Fixed by #195

Comments

@tim-x-y-z
Copy link
Contributor

when on the cities pagination example in the demo app can't go back to page 1 when on another page.

@samuelcolvin
Copy link
Member

Nice find, I'll look soon.

@parthjoshi90
Copy link

parthjoshi90 commented Jan 2, 2024

I found an issue here

Screenshot from 2024-01-03 00-16-11

Do we need this condition?
https://github.com/pydantic/FastUI/blob/main/src/npm-fastui-bootstrap/src/pagination.tsx#L86-L90

I got the correct behavior when I added the onClick = { type: 'go-to', query: {page} } in place of onClick = { type: 'go-to', query: {} }. I guess the page represents the page number and not the total number of pages in the pagination, am I right?

I have changed the code here and it was working. I hope I have not missed anything.
parthjoshi90@02cf514

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 a pull request may close this issue.

3 participants