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

External filter does not work correctly if the value is not present in the table #825

Open nicolabassan-centropaghe opened 2 years ago

nicolabassan-centropaghe commented 2 years ago

Describe the bug I use an external filter for my table. I filter for a value that is not present in table. The filtered table returns all rows instead of no rows.

Reproduction steps:

  1. Open official page of examples: https://www.tablefilter.com/dynamic-external-filters.html
  2. Use the button F12 to edit the page
  3. Add new Year value in External Filter (be sure that this value are not present in table: ie 2020)
  4. Try to filter for this value

Expected behavior I expect that since there are no matches then 1 - no rows are extracted 2 - the filter remains active

Observed behavior: All rows of the table are shown as if no filter was set. The filter remains not active.

TableFilter version: [latest] Browser and version: [Firefox 93.0] [Google Chrome 94.0.4606.81] OS and version: [Win 10]