Skip to content
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

Fix #16308: Flawed example in table paginator documentation #16309

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

Wendelstein7
Copy link
Contributor

@Wendelstein7 Wendelstein7 commented Aug 29, 2024

Fixes #16308 - The example code for programmatically paginating trough tables, in the isLastPage() function, is flawed because it only works correctly when the amount of items in the table is an exact multiple of the rows per page count.

The new line correctly identifies the last page by checking if the index after the current page's last item reaches or exceeds the total length of the customers list.

The old line incorrectly identifies the last page, only working correctly when the amount of items in the table is an exact multiple of the rows per page count.

The new line correctly identifies the last page by checking if the index after the current page's last item reaches or exceeds the total length of the customers list.

The old line incorrectly identifies the last page, only working correctly when the amount of items in the table is an exact multiple of the rows per page count.
Copy link

vercel bot commented Aug 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Aug 29, 2024 8:25am

@Wendelstein7 Wendelstein7 changed the title Fixed flawed example in table paginator documentation Fix #16308: Flawed example in table paginator documentation Aug 29, 2024
@mehmetcetin01140 mehmetcetin01140 merged commit dbf5160 into primefaces:master Sep 10, 2024
2 checks passed
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.

Table: Flawed example in paginator documentation
3 participants