I'm using the smart table with an api and also include a custom filter directive so i can filter by different columns and is working ok. When i click on a row i go to another page to see more information, in this new page theres a "go back" button , so i store the table collection on a service so when i "go back" i resume the collection without calling the api and the custom filters runs again because i got them stored also on a service. The issue that i cant solve is to go to an specific page after the custom filter is execute.
I try to use the controller.slice() watching the ctlr.getFilteredCollection but the custom filter override the page changes that the slide function make. Also i try to use a persist directive on localstorage but is the same, the custom filter execute and override the load of the localstorage collection overriding the page.
is There a way to set an specific page after the custom filter? from the custom filter directive theres a way to access the tableState?
my custom filter looks similar to (of course with some custom logic):
.filter('customFilter', ['$filter', function ($filter) {
return function customFilter(array, expression) {
return output;
};
}]);
Sorry I am not sure to understand. As you said using the "slice" method on the API should allow you to select a specific part of your dataset. Please provide running example, etc so we can dig into your issue
Hi.
I'm using the smart table with an api and also include a custom filter directive so i can filter by different columns and is working ok. When i click on a row i go to another page to see more information, in this new page theres a "go back" button , so i store the table collection on a service so when i "go back" i resume the collection without calling the api and the custom filters runs again because i got them stored also on a service. The issue that i cant solve is to go to an specific page after the custom filter is execute.
I try to use the controller.slice() watching the ctlr.getFilteredCollection but the custom filter override the page changes that the slide function make. Also i try to use a persist directive on localstorage but is the same, the custom filter execute and override the load of the localstorage collection overriding the page.
is There a way to set an specific page after the custom filter? from the custom filter directive theres a way to access the tableState?
my custom filter looks similar to (of course with some custom logic):