I have a customer-listing page with a filter button and the button will trigger a dialog to input the parameters for search.
Once I apply the filter (ajax process), the results are filtered and displayed properly the dialog is closed.
Since I have pagination, on paginating to the next page the filter parameters are not found as the dialog is closed.
Now how do I overcome this issue and retain the form data? Please advise! Thanks!
BTW, I'm using tablesorterPager for paginating
tablesorterPager({
container: $('#pager'),
removeRows: true,
page: 0,
size: 10,
savePages: false,
ajaxUrl: utrl,
customAjaxUrl: function(table, url) {
//The below serailize is where the input for search form resides and doesn't work for the second page pagination.
return url += '&'+$('[name="search_filter"]').serialize();
},
ajaxProcessing: function (data) {
if (data[0] === 0) {
return false;
}
return data;
}
})
You can save filter params in a Backbone model, something along the lines of