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 issue with full-page navigation when show total is disabled #1417

Merged
merged 1 commit into from Sep 11, 2023

Conversation

KinyaElGrande
Copy link
Contributor

Ref: #1376

This PR resolves issues related to full-page navigation. It resolves cases when 'show total' is disabled, the last page has a count of 0 items and is never showed if the items on the last page are not equal to the limit, and an extra page consistently being returned in the pageNavigation object.

@KinyaElGrande KinyaElGrande linked an issue Sep 1, 2023 that may be closed by this pull request
3 tasks
@KinyaElGrande KinyaElGrande removed the request for review from Fajfa September 1, 2023 12:33
Copy link
Member

@tjerman tjerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; just add some comments about the whole function please 🙏 (what we talked in DMs)

Copy link
Member

@tjerman tjerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ship it

Copy link
Member

@tjerman tjerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the biggest fan of cutting the mistake from pageNavigation -- I'd rather see the surrounding code change to exclude this edge case.

For me, it's ok as is but I'd suggest we add a little @todo to re-visit this function and clean it up properly -- it became a bit of a mess (my fault included 🙈)...

If it's tested and works as expected, it's mergable but do consider what I noted down above

and resolve page count on the last page issue
@KinyaElGrande KinyaElGrande merged commit 26e8dd0 into 2023.3.x Sep 11, 2023
1 check passed
@KinyaElGrande KinyaElGrande deleted the 2023.3.x-fix-fullpage-navigation branch September 11, 2023 09:28
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.

Full page navigation edge case
2 participants