-
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
Total Server Items Fix #369
Conversation
Changed total server items in the footer to calculate using $scope.totalServerItems. Updated ng-grid directive to watch for a string value passed in, similar to other two-way data binding properties.
Just wanted to leave a note here as well. We decided not to include any more changes in 2.0.5, so that it wouldn't be delayed any further. This will go out in 2.0.6. Thanks for the PR! |
I'm a little confused by this; I thought that the $scope.pagingOptions = {
totalServerItems: 0
}; ..was to be set by the client, to the total number of row items in the entire dataset, so that the ng-grid knew how many pages it had available? However it seems to be set by ng-grid to the number of items in the grid currently? A little documentation on this might not go amiss!? |
Thanks to @keithharvery for the PR. The `totalServerItems` grid option can once again be set to a string, which will be watched by the grid and reflected in the footer if updated. Also added tests to directivesSpec.js for using a normal number and using a string.
Thanks to @keithharvery for the PR. The `totalServerItems` grid option can once again be set to a string, which will be watched by the grid and reflected in the footer if updated. Also added tests to directivesSpec.js for using a normal number and using a string.
Closed in 2.0.6 branch |
I have a null totalServerItems count, and can't seem to update it on 2.0.6. I've tried $scope.serverItems, $scope.totalServerItems, $scope.gridOptions.totalServerItems and parent scope variations with numbers and strings. It looks like this is being watched by default now? Any suggestions welcome, as I'm having a hard time figuring out where/when to set this (I used to set the gridOptions variant in 2.0.4 and it worked OK). |
Fixes a bug where total server items wouldn't update after the move out of pagingOptions (thank you!).
Changed total server items in the footer to calculate using $scope.totalServerItems. Updated ng-grid directive to watch for a string value passed in, similar to other two-way data binding properties.