-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.x] Current page items always show on the first page #48438
Conversation
Tests fail here. |
The code below always returns ["one", "two", "three"] regardless of changing $currentPage
|
I don't feel this change makes sense sorry. |
@hiidemo i think there is a misunderstanding of how the paginator works. The items you pass as a first parameter into the constructor should be the already paginated items. The |
I tried passing the first parameter as paginated items (code example below). The resulting data displays the current page correctly but does not show the button to move to the next page in all cases.
|
This kind of paginator doesn't know how many items the whole dataset has, so it doesn't know whether there is more data (more pages) or not. You have to either pass more data than the |
When paging from the sample data array with Paginator class, $items variable always has data from the first page, without changing according to the current page number.