How to add the exact match property on multiple column filters?
How to add the exact match property on multiple column filters?
I implemented individual column searching using this reference:
https://live.datatables.net/cusologu/7/edit
There is no bug, but it returns multiple hits on searches like 'Developer', or 'Director'
Returns 'JavaScript Developer' and 'Developer' when selecting 'Developer'
Returns 'Regional Director' and 'Director' when searching for 'Director'
There is an implementation of { exact: true } in the below link, which does not exhibit the multiple returned values, but the code is significantly different than above:
https://datatables.net/examples/api/multi_filter_select.html
select.addEventListener('change', function () {
column
.search(select.value, {exact: true})
.draw();
});
How would the {exact: true} setting be applied to this version:
https://live.datatables.net/cusologu/7/edit
Thanks
Answers
That test case is loading the nightly for Datatables 1.13.11. I believe the
DataTables.SearchOptions
were introduced in DT 2.0. I updated the test case to use Datatables 2.1.7 and now the{ exact: true }
option works.https://live.datatables.net/qejekoti/1/edit
Kevin