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

mode='remote' + dropdownAllowAll enabled and selected >> total changes we should keep currentPerPage to -1 #968

Open
julius-spudvilas opened this issue Oct 16, 2023 · 0 comments

Comments

@julius-spudvilas
Copy link

julius-spudvilas commented Oct 16, 2023

Expected Behavior
When dropdownAllowAll enabled + selected and total changes we should keep currentPerPage to -1

Actual Behavior
The currentPerPage is set to the total results value and that breaks the pagination dropdown as such option does not exists

Steps to Reproduce the Problem
Set dropdownAllowAll to true
Use mode='remote'
Get some resuts in table lets say 10
Then update results to anything else, let say 5
Pagination perPage dropdown breaks as:
after total changes the currentPerPage value is set to 5 and 5 is not available option in rowsPerPageOptions

Solution:
https://github.com/xaksis/vue-good-table/blob/889962c5b67f5bb621caa0a9bf0b3852d4199235/src/components/pagination/VgtPagination.vue#L146C65-L146C65
line 146 should also check that currentPerPage is NOT -1

@julius-spudvilas julius-spudvilas changed the title When dropdownAllowAll enabled + selected and total changes we should keep currentPerPage to -1 mode='remote' + dropdownAllowAll enabled and selected >> total changes we should keep currentPerPage to -1 Oct 16, 2023
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

No branches or pull requests

1 participant