Update pagination and info after manual search
Update pagination and info after manual search
tatulea
Posts: 3Questions: 1Answers: 0
Hi,
I made a manual search for my custom input search.
$(".datatable").DataTable().columns(columns_to_search).search($(this).val()).draw();
The problem is that after it updates my table, the info and pagination are not updated. How can update them regarding to the number of search returned rows.
Thank you,
This discussion has been closed.
Answers
Are you using server side processing?
If so then look at the server side script to see what its returning for those values. Maybe its not reflecting the search results in the counters.
Otherwise maybe you can post a link or test case showing the issue.
Kevin
Yes, I am using https://github.com/pivotal-energy-solutions/django-datatable-view.
The problem is that the request on search sets columns as well. I mean, if I do just
it works good, but if I put the columns filter, the request is like columns[0][search][value]=..., columns[1][search][value]=..., etc
The request without columns search is like search[value]': 'dec'. The request with columns have search[value]: '' and each column have columns[0][search][value]: 'dec'
The variables that DataTables sends to the server-side are fully documented here.
Do you actually need server-side processing? Are you working with tens of thousands or more rows? If not, disable server-side processing.
If you do need it, then it looks like your need to debug that server-side script to see if it handles column filters correctly or not.
Allan