{"action":"created","issue":{"url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/469","labels_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/469/comments","events_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/469/events","html_url":"https://github.com/lorenzofox3/Smart-Table/issues/469","id":99940749,"number":469,"title":"How locally sorting and searching with server side pagination ?","user":{"login":"maustand","id":5491098,"avatar_url":"https://avatars.githubusercontent.com/u/5491098?v=3","gravatar_id":"","url":"https://api.github.com/users/maustand","html_url":"https://github.com/maustand","followers_url":"https://api.github.com/users/maustand/followers","following_url":"https://api.github.com/users/maustand/following{/other_user}","gists_url":"https://api.github.com/users/maustand/gists{/gist_id}","starred_url":"https://api.github.com/users/maustand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maustand/subscriptions","organizations_url":"https://api.github.com/users/maustand/orgs","repos_url":"https://api.github.com/users/maustand/repos","events_url":"https://api.github.com/users/maustand/events{/privacy}","received_events_url":"https://api.github.com/users/maustand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-09T23:42:32Z","updated_at":"2015-08-10T03:27:35Z","closed_at":null,"body":"Hi Guys\r\nJust i wanna know if there is available way to enable partial server side processing ?\r\n\r\nI wanna keep the sorting, searching functions in the client side but server side manage the pagination system with my pipe/ajax function.\r\n\r\nI know that if i set a pipe function, maybe i should manage this by server side, but i prefer to do it locally. \r\n\r\nMaybe its a trivial question and already it has been replied, but i tried to find something in the bugs tracker and just i got this :  \r\nhttps://github.com/lorenzofox3/Smart-Table/issues/9\r\nhttps://github.com/lorenzofox3/Smart-Table/tree/server-partial\r\n\r\nSo those examples are very old and i noticed that it is not working anymore..\r\n\r\n\r\nThis is my code : \r\n\r\n```html\r\n\t\t\t<table  config=\"globalConfig\"\r\n\t\t\t\tst-pipe=\"leadsServPage\" \r\n\t\t\t\tst-table=\"leadsDisplayedCollection\" \r\n\t\t\t\tclass=\"table table-striped\" >\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th st-sort=\"phoneNumber\">Phone Number</th>\r\n\t\t\t\t\t\t<th st-sort=\"userName\">Username</th>\r\n\t\t\t\t\t\t<th st-sort=\"kharonStatus\">Status</th>\r\n\t\t\t\t\t\t<th>Comment</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<input class=\"input-sm form-control\" placeholder=\"search Phone Number\" st-search=\"phoneNumber\" />\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<input class=\"input-sm form-control\" placeholder=\"search Username\" st-search=\"userName\" />\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t<st-select-distinct collection=\"leadsDisplayedCollection\" predicate=\"kharonStatus\"></st-select-distinct>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr ng-repeat=\"row in leadsDisplayedCollection\">\r\n\t\t\t\t\t\t<td>{{row.phoneNumber}}</td>\r\n\t\t\t\t\t\t<td>{{row.userName}}</td>\r\n\t\t\t\t\t\t<td>{{row.kharonStatus}}</td>\r\n\t\t\t\t\t\t<td>{{row.comment}}</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t\t<tfoot>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"5\" class=\"text-center\">\r\n\t\t\t\t\t\t\t<div st-pagination=\"\" st-items-by-page=\"defaultItemsByPage\"></div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tfoot>\r\n\t\t\t</table>\r\n}\r\n```\r\n\r\n```javascript\r\n\r\n    $scope.leadsServPage = function leadsServPage(tableState) {\r\n\r\n      LeadsSvc.orgLeadsList($stateParams.idOrganization, { \r\n        index: tableState.pagination.start  || 0,\r\n        count: tableState.pagination.number || DEFAULT_ITEMS_BYPAGE,\r\n        withTotal: true\r\n      }).then(function (serverData) {\r\n        $scope.leadsDisplayedCollection = serverData.data.response.leads;\r\n        tableState.pagination.numberOfPages = Math.ceil(( serverData.data.response.total / DEFAULT_ITEMS_BYPAGE ));\r\n      });\r\n    };\r\n\t\t\r\n```\r\n\r\nThank you in advance.\r\n\r\nMauricio Stand."},"comment":{"url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/comments/129288269","html_url":"https://github.com/lorenzofox3/Smart-Table/issues/469#issuecomment-129288269","issue_url":"https://api.github.com/repos/lorenzofox3/Smart-Table/issues/469","id":129288269,"user":{"login":"lorenzofox3","id":2402022,"avatar_url":"https://avatars.githubusercontent.com/u/2402022?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzofox3","html_url":"https://github.com/lorenzofox3","followers_url":"https://api.github.com/users/lorenzofox3/followers","following_url":"https://api.github.com/users/lorenzofox3/following{/other_user}","gists_url":"https://api.github.com/users/lorenzofox3/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzofox3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzofox3/subscriptions","organizations_url":"https://api.github.com/users/lorenzofox3/orgs","repos_url":"https://api.github.com/users/lorenzofox3/repos","events_url":"https://api.github.com/users/lorenzofox3/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzofox3/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T03:27:35Z","updated_at":"2015-08-10T03:27:35Z","body":"In this case I think the best is not to handle the pagination (and how you load data) with smart-table but to do it on your own:\r\n1. Don't use st-pagination\r\n2. Don't use st-pipe so the default client side logic (filter,sort) will be handled by smart-table\r\n3. Use st-safe-src attribute so smart-table will know when you have loaded new batch of data"}}