Use select multiple column search on columns with multiple values
Use select multiple column search on columns with multiple values
Hi,
I have a column with a select multple. This means that this column can have several values.
I want the user to be able to search for multiple values. Each time the value is in the row, it would match.
I tried with this :
$('.select_search_column', this.footer()).on('change', function () {
var val = $(this).find('option:selected').text();
console.log(val);
that
.search(val)
.draw();
});
But it does'nt work because the value is a string like this : "firstValueSecondValueThirdValue".
Also I tried to get the value as an array :
var val = $('#select_template_search').select2('val');
And now I don't know how to modify the search function to match with the rows who have those values.
Any help would be nice :)
Answers
I'm still looking for a solution :)