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

Select-Filter does not work when a option contains a exclamation mark "!" #841

Open Zeg31 opened 1 year ago

Zeg31 commented 1 year ago

Select-Filter does not work when the option contains a "!".

Reproduction steps: Steps to reproduce the behavior:

  1. Build a Table with "Example A" and "Example !" in different rows but.
  2. Use filter 'select' for that column.
  3. "Example A" and "Example !" will be shown in the Select-Box.
  4. If you choose "Example A" all is fine.
  5. But if you choose "Example !" nothing changes.

TableFilter version: 0.7.3 Browser and version: Firefox 109

koalyptus commented 1 year ago

Hi @Zeg31,

The ! character is an operator in querying syntax, please use the different_operator option to define a different character or sequence of characters:

var tfConfig = {
  ...
  different_operator: '<>',
  ...
};

Resources: