koalyptus / TableFilter

A Javascript library making HTML tables filterable and a bit more :)
https://www.tablefilter.com
MIT License
324 stars 95 forks source link

Filtering a table when the search value set on a multiple column is not present in the column #808

Open enrico28 opened 3 years ago

enrico28 commented 3 years ago

Hi,

I'm trying to filter a table programmatically. First I set the lookup value on a multiple filter column using the setFilterValue () method: tf.setFilterValue (index, value); where 'value' is not always present in the column 'index'.

Then filter the table using the filter() method; tf.filter();

If the value is present in the column, I get all the rows containing the value. But if the value is not present in the column, I get all the rows of the table, instead of the message 'No results'.

How can I get the expected result?

col_8: 'multiple',

state: {
   types: ['cookie'],
   filters: true,
   page_number: false,
   page_length: false,
   sort: true,
   columns_visibility: true,
   filters_visibility: false
}

Thanks Enrico

For usage and support questions, please check out resources below, you might find an answer: