-
Notifications
You must be signed in to change notification settings - Fork 116
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
no total_pages in meta response #206
Comments
I also had the same issue, I ended up changing the meta to have total_pages instead of total and messages seemed to go away. For your issue with still being able to click the disabled next button, I had the same issue. I found that I was sending over a float as the total_pages in the meta. Once I switched to int, the next button was no longer clickable once I got to the end. I would think the library would check type and convert to int if needed. -- |
Is this still the case in v3.0.0 ? |
Yep same problem for me. Maybe because my pagination is inside content->meta->pagination->total_pages but i have no power on this, dingo/api return me this structure. |
I also had the same issue, I fixed this by normalizing the server's response, by adding this code in application's controller.
|
used the same code with some changes.
information is in meta.pagination because we use dingo
|
Hello,
My api send me this structure
Following the dummy test here's my controller
and my route
The pagination is good, but i can click on next page even if the next page is empty (6 records on a total of 50 items, only one page)
and here's the console log
Did i miss something ?
Thank you.
EDIT
In fact, the "next arrow" have the class "disabled" but i can still click on this (maybe a simple template error), but it's always disabled even if i have a next page. maybe because totalPages is undefined.
The text was updated successfully, but these errors were encountered: