-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
What the hell is going on with the paging "totalServerOptions"?! #504
Comments
Pull request #505 fixes this, if the documentation is the correct way to do things. |
You should be using the $scope.gridOptions.totalServerItems = data.count Just made a plunker for it: http://plnkr.co/edit/50vJrs?p=preview I will update the documentation when I get back. Sorry about that. |
In which case, can we have the "null items" bug fixed please? |
Yes, I am going to update it in the 2.0.7 pull request when I get back. The null was only happening if you weren't using a string for the totalServerItems and did not explicitly set gridOptions.totalServerItems. The maxRows function in footer returns the math.max, but if totalServerItems was undefined, the number returned would be a NaN |
Will leave open until it is updated. |
Hmm.. I am explicitly setting totalServerItems (not on startup however), but I'm still seeing null values after its been set! That ,and being able to go to page 2 when there's less than 1 page worth to begin with. |
Can you show it in a plunker? |
Now I know why they were split. "we switched out the place where totalServerItems is set because people |
I think there's a lot of confusion about what people are meant to be using regarding the totalServerOptions variable when using server-side paging.
I now no-longer know whether I should be setting:
$scope.gridOptions.totalServerItems = data.count
or
$scope.gridOptions.pagingOptions.totalServerItems = data.count
If it's the latter, then a load of functions need to be modified in
/src/classes/footer.js
as they all refer to$scope.totalServerItems
. If it's the first option, then it doesn't currently work (getting "null" constantly).The text was updated successfully, but these errors were encountered: