-
Notifications
You must be signed in to change notification settings - Fork 512
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
Pass a total into the pagination? #146
Comments
Hello, from within the table, you can get access to the table state with the controller method $scope.customPipe=function pipe(tableState){
//note 'this' in this function is actually bound to the table controller
var serverquery=transformToQuery(tableState);
httpService.query(serverquery).then(function(response){
//assign data
$scope.rowCollection=response.data;
//change table state from what tells the server
tableState.pagination.numberOfPages=response.totalNumberOfPages;
});
} Laurent |
Ah, makes total sense. Will give that a shot! 👍 One thing though, it's seems that |
Is there a way to pass a "total" number of records into the pagination? I only want to fetch say the first 20 records from my server, and then pass limit and skip options with each click on the pagination buttons using the
st-pipe
plugin, but I can't figure out how to get all of the page numbers to display by default - based on atotal
property I get back from my server.Am I thinking about this wrong perhaps?
The text was updated successfully, but these errors were encountered: