Skip to content

Fix total_pages for empty or incompletely-loaded table to 1#50

Merged
picklelo merged 1 commit intoreflex-dev:mainfrom
mcw0933:fix/pagination
Dec 13, 2024
Merged

Fix total_pages for empty or incompletely-loaded table to 1#50
picklelo merged 1 commit intoreflex-dev:mainfrom
mcw0933:fix/pagination

Conversation

@mcw0933
Copy link
Copy Markdown
Contributor

@mcw0933 mcw0933 commented Dec 12, 2024

We are using the table_state backend component in an app that loads the table from an API call.

While the table is loading, the UI would display Page 1 of 0, because page_number is always at-least 1, where total_pages had an else condition setting it to 0.

This fixes that.

Copy link
Copy Markdown
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@picklelo picklelo merged commit 77748cc into reflex-dev:main Dec 13, 2024
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 this pull request may close these issues.

2 participants