Fix computed pagination issues - #805
Closed
devnatan wants to merge 2 commits into
Closed
Conversation
devnatan
force-pushed
the
fix/computed-pagination-issues
branch
from
October 31, 2025 16:07
b151325 to
e168cb7
Compare
devnatan
force-pushed
the
fix/computed-pagination-issues
branch
from
November 28, 2025 13:39
e168cb7 to
0a2f99d
Compare
Contributor
|
Will this be merged soon? |
Owner
Author
This week! I'm on vacation right now :)) |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #682
Fixes #693
Fixes #695