Individual column searching isn't compatible with Ajax data source
Individual column searching isn't compatible with Ajax data source
andrew45
Posts: 24Questions: 8Answers: 0
I tried many times, then searched on the internet, but couldn't find a way to get individual column searching (both text inputs and select inputs) working with Ajax data source. Seems like nothing happens. It works perfectly, however, if data come to the DataTable from html code.
http://live.datatables.net/bahiqume/1/
Is there anything we can do to get the individual column searching worked with Ajax data source?
Replies
The examples are working:
https://datatables.net/examples/api/multi_filter.html
https://datatables.net/examples/api/multi_filter_select.html
Check your own code against either or both of those examples. Data source is not the issue. My own site uses individual column filters with Ajax sources.
Thanks, tangerine.
Only on the page https://datatables.net/examples/api/multi_filter_select.html there was the next comment which made all the difference:
@v1.10.1909:21, Thu 13th Sep 2018
when using this along with ajax or javascript array, not only <tfoot></tfoot> needs to be present, but specifically the <th></th> element for each piece.
So I added this and it works now.
http://live.datatables.net/bahiqume/1
I don't think you should have had to read the comments to find vital bits of info.
Perhaps @Allan will consider updating the docs as appropriate.
Yes, @tangerine, it was my mistake.
Initially I tried to have individual column searching with text inputs only. There was no crucial info about Ajax in the comments section. That's why the page should be updated with such info.