Skip to content

Fix computed pagination issues - #805

Closed
devnatan wants to merge 2 commits into
mainfrom
fix/computed-pagination-issues
Closed

Fix computed pagination issues#805
devnatan wants to merge 2 commits into
mainfrom
fix/computed-pagination-issues

Conversation

@devnatan

Copy link
Copy Markdown
Owner

Fixes #682
Fixes #693
Fixes #695

@devnatan devnatan self-assigned this Oct 30, 2025
@devnatan
devnatan force-pushed the fix/computed-pagination-issues branch from b151325 to e168cb7 Compare October 31, 2025 16:07
@devnatan
devnatan force-pushed the fix/computed-pagination-issues branch from e168cb7 to 0a2f99d Compare November 28, 2025 13:39
@webhead1104

Copy link
Copy Markdown
Contributor

Will this be merged soon?

@devnatan

Copy link
Copy Markdown
Owner Author

Will this be merged soon?

This week! I'm on vacation right now :))

@devnatan devnatan closed this Jul 29, 2026
devnatan added a commit that referenced this pull request Jul 29, 2026
…date

PR #805 claimed to fix #682/#693/#695 but its actual diff only added a
Supplier-based computedPaginationState overload plus a comment reword -
it never touched the real bugs. Fixing them properly here:

- Pagination#hasPage(int) unconditionally returned true for computed
  pagination regardless of page index (even negative ones), making
  canAdvance()/canBack() always true. Fixes #682.

- Computed pagination's source was never sliced down to the current
  page - loadSourceForTheCurrentPage() returned the full recomputed
  source as-is instead of calling Pagination.splitSourceForPage() like
  lazy pagination already does, so every page rendered the same
  leading slice of items regardless of currentPageIndex(). This also
  made #682's fix meaningful, since pagesCount is only correct once
  the source is loaded through the same path lazy pagination uses.

- Pagination#update() was a no-op for computed pagination unless the
  page had just changed or forceUpdate() was used, because
  PaginationImpl#updated() only reloaded the current page when
  forceUpdated || pageWasChanged. Computed sources are meant to be
  recomputed on every update by definition, so isComputed() is now
  part of that condition too. Fixes #693, and very likely #695 since
  computedAsyncPaginationState hits the same code path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants