Skip to content
Source
Sign inSign up
TanStack/table

When using filterVariant: 'range' and filtering with a min value of 0, null values are also included in the results #6007

ClosedMichaelCharles(GitHub profile, opens in a new tab) opened this issue 1 comment

TanStack Table version

8.21.3

Framework/Library version

React 18.3.1

Describe the bug and the steps to reproduce it

I created a fork of the official example for table filters and modified it so that some "age" values are randomly generated as null.

The minimal reproducible example is linked below.

When applying a range filter from 0 to a number (such as 20), values which are null are also included in the results.

If this behavior is not intentional, then this should be considered a bug.

If this is intentional, I'd like to understand the reasoning behind including null values in the results.

https://stackblitz.com/edit/tanstack-table-rktr4rmq

Screenshots or Videos (Optional)

Image

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  1. In my post I referred to it as filterVariant: 'range' as that is the way it is set in the example project, however the filter it is actually using should be inNumberRange. That is what we're using in our production app where we first viewed the behavior.

  2. KevinVandy closed this

Sign in to join this conversation.