Search question
Search question
balajispn
Posts: 1Questions: 1Answers: 0
Hi,
When I do a search on a datatable, are there any options to match only the characters from the first or the last - sort of like 'xyz%' or '%xyz'. Just plain simple character matching (nothing special with Regex needed here). Right now, it searches for '%xyz%' and I want to know if there are anyways to customize this. Pl advise.
dbTable.columns().every(function(){
var dbTableColumn = this;
$(this.footer()).find('input').on('keyup change', function(){
console.log('inside keyup event' + this.value);
dbTableColumn.search(this.value).draw();
});
});
This discussion has been closed.
Answers
Currently no. That is something I want to address in the next major version - although as I've just written in a different thread, I don't expect that to be until sometime in 2018. Until then you would need to modify the DataTables source or use a custom search plug-in.
Allan