Skip to content

Table pagination - Fixed bug when page size is small#913

Open
AleksandarCila wants to merge 1 commit into
firecmsco:mainfrom
AleksandarCila:bug/small-page-size-pagination
Open

Table pagination - Fixed bug when page size is small#913
AleksandarCila wants to merge 1 commit into
firecmsco:mainfrom
AleksandarCila:bug/small-page-size-pagination

Conversation

@AleksandarCila

@AleksandarCila AleksandarCila commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes collection table pagination getting stuck when small page sizes are used, such as pagination: 10.

Problem

VirtualTable used endOffset both to detect when the user was near the bottom and to throttle repeated onEndReached callbacks. With the default endOffset of 600px, pagination could fail when the table had no scroll area, or when the available scroll distance was smaller than 600px.

Changes

  • Request more rows when the current table content does not fill the viewport.
  • Trigger onEndReached once per loaded data.length instead of requiring the scroll offset to advance by endOffset pixels.
  • Keep the existing endOffset behavior for deciding when the user is near the bottom.

Testing

  • Tested a collection with pagination: 10 and more than 10 documents.
  • Verified large viewports continue loading when the first page does not fill the table.
  • Verified smaller viewports load more when scrolling to the bottom, even when the scrollable distance is less than 600px.
  • Ran ESLint on the edited files.

Screenshots

Page size 10 on big screen
page_10_big_fix

Page size 2 on small screen
page_2_small

Closes #912

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.

Pagination can get stuck with small page sizes

1 participant