question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text columns with HeaderFilter will filter on null values as "null" string

See original GitHub issue

Describe the bug I have table columns that are string/text types. When I enable filtering, any cell with a null value will filter as if the value of the cell was the string “null”. In testing, I also found that this occurs for “undefined” values as well.

Tabulator Info

  • Which version of Tabulator are you using? v4.2.2

Working Example https://jsfiddle.net/haferje/gj0kampx/2/

To Reproduce Steps to reproduce the behavior:

  1. Go to the JSFiddle URL that I linked
  2. In the filter of column ‘Col 2’, type the values ‘null’ or ‘undefined’
  3. See how the values are not treated as empty strings

Expected behavior Typing ‘null’ and ‘undefined’ in the filter should produce no matching rows

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome

Additional context The issue occurs at line 69 of the filter module in initializeColumn(). String(column.getFieldValue(data)) produces "null" and "undefined" for their respective value.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
haferjecommented, Apr 4, 2019

Sorry to hear that. I’ll be patient.

0reactions
haferjecommented, Apr 7, 2019

Code change looks good - I’ll try it when I get back to work Monday. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filtering Data - Tabulator
Empty Header Filters. By default Tabulator will clear the filter when it considers the header filter value to be empty, in the case...
Read more >
Filter on null, blank, or empty values | ThoughtSpot Software
blank or empty values, like an empty string of text or a string ... This formula will show "null" where the value contained...
Read more >
ASPxGridView - Header Filter problem when FilterMode is ...
Hello, There is a problem with filtering empty rows when column ... null or empty so it looks like display text is always...
Read more >
Data Grid - Filtering - MUI X
The filters can be modified through the grid interface in several ways: ... do not need any value (for instance the isEmpty operator...
Read more >
Simple Filters - Angular Data Grid
filter. string | null. The text value associated with the filter. It's optional as custom filters may not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found