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

Total Server Items Fix #369

Closed
wants to merge 2 commits into from
Closed

Conversation

keithharvey
Copy link

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.

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.
@keithharvey
Copy link
Author

Relevant Issues:
Bug report: Issue #332
Change Request: Issue #161

@molocco molocco mentioned this pull request Apr 29, 2013
@c0bra
Copy link
Contributor

c0bra commented Apr 29, 2013

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!

@ghost ghost assigned c0bra Apr 29, 2013
@Siyfion
Copy link

Siyfion commented Apr 29, 2013

I'm a little confused by this; I thought that the totalServerItems in the following:

$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!?

c0bra added a commit that referenced this pull request May 3, 2013
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.
c0bra added a commit that referenced this pull request May 3, 2013
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.
@c0bra
Copy link
Contributor

c0bra commented May 8, 2013

Closed in 2.0.6 branch

@c0bra c0bra closed this May 8, 2013
@dylanz
Copy link

dylanz commented Jun 20, 2013

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).

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.

4 participants