FastUI
FastUI copied to clipboard
pagination component - can't go to page '1'
when on the cities pagination example in the demo app can't go back to page 1 when on another page.
Nice find, I'll look soon.
I found an issue here
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. https://github.com/parthjoshi90/FastUI/commit/02cf514e6694c585e568520c8b06b34c5f3f0733