You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently have a standardized paging query I get from an angular service which is used to bind ng-grid's page info/filter info to. $scope.nav = navSvc.getPageQuery() and then I $watch that object for changes and post when currentPage changes, a filter is added, etc.
This arrangement seems intuitive to me and I'd like to make it work. The only problem with this approach (apart from the sortInfo bug) is that whenever I get the data back from the server I'd like to update the total server items. This triggers the $watch. I could work around this inside the $watch with some comparison logic, but wouldn't totalServerItems be better left outside of the pageInfo object since any external paging wouldn't need it?
The text was updated successfully, but these errors were encountered:
you shouldn't have to watch the entire object though. you should be able to just watch the items you need.
but just to explain our original reasoning, we chose to add hierarchical options for server-side paging and filtering because they are pretty isolated to specific use-cases and we didn't want to clutter up the base grid options with irrelevant options.
I would rather not make a change to the existing options that could break other user's existing implementations. If you could give me a plunker I think I know if a simpler way to solve your problem from reading it.
I think this makes sense to change since then you can watch the object by itself since the totalServerItems is really not used for querying and only display.
this is changed in 847d13e and will be in 2.1 main release.
I currently have a standardized paging query I get from an angular service which is used to bind ng-grid's page info/filter info to. $scope.nav = navSvc.getPageQuery() and then I $watch that object for changes and post when currentPage changes, a filter is added, etc.
This arrangement seems intuitive to me and I'd like to make it work. The only problem with this approach (apart from the sortInfo bug) is that whenever I get the data back from the server I'd like to update the total server items. This triggers the $watch. I could work around this inside the $watch with some comparison logic, but wouldn't totalServerItems be better left outside of the pageInfo object since any external paging wouldn't need it?
The text was updated successfully, but these errors were encountered: