koalyptus / TableFilter

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

[empty] filter does not contain field with only HTML-Tags #769

Closed rimace closed 3 years ago

rimace commented 4 years ago

Describe the bug The [empty] filter now filters out columns that contain nothing visible to the user, only empty HTML-Tags.

Reproduction steps: Steps to reproduce the behavior:

  1. Use a table with a column that contains only an empty
    tag or any other tag
  2. Type "[empty]" (without "") in the filter.

Expected behavior The row should still be seen. As the column does not contain anything for the user, it should not be filtered out when using [empty].

Observed behavior: The row gets filtered and is not shown anymore.

TableFilter version: 0.6.109 Browser and version: Firefox 68 ESR and 73 OS and version: Fedora 31 Device: Dell Latitude

Additional information/context: It worked as expected with version 0.6.47.

rimace commented 4 years ago

I found out it was pull request #626 (release with version 0.6.50) that introduces the bug but fixed #625 . Reading the PR, I think it is more of a definition than a bug, if invisible tags count as content. Maybe there is a way to find out if the tag is visible to the user? This would solve my problem and still contains the feature from that PR :)

koalyptus commented 4 years ago

Hi @rimace, starting from v0.7.2 the empty operator should satisfy the scenario you described in this ticket, main change being here: https://github.com/koalyptus/TableFilter/pull/784/files#diff-692e87a92facd3d8d9d526be6777b6bfR1878

Let me know how it goes. Cheers