vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
731 stars 285 forks source link

Using Multiselect and exclude don't work together #559

Closed pricejt closed 4 years ago

pricejt commented 5 years ago

If my code uses multiselect and exclude the exclude box is removed. { column_number: 7, filter_type: "multi_select", select_type: "select2", text_data_delimiter: ",", exclude: true },

See the comments box, that it no longer has an exclude checkbox.

image

Is this how it should work? It would be nice to exclude multiple items to narrow down results.

vedmack commented 5 years ago

Hi,

Its "Currently available for the text filter" , but it can be added to multi select filter type, it shouldn't be a big deal, consider sending a PR or wait for it

vedmack commented 5 years ago

most of the "logic" is to replace stringForSearch in oTable.fnFilter(stringForSearch, column_number_filter, true, false, true); with "^((?!" + stringForSearch + ").)*$" inside the doFilterMultiSelect, just need to add the regex checkbox (like in text filter) and adding a check if its checked while generating the stringForSearch in the doFilterMultiSelect function