Skip to content

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

@MichaelCharles

Description

@MichaelCharles

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.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

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.

Activity

MichaelCharles

MichaelCharles commented on May 8, 2025

@MichaelCharles
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @MichaelCharles

        Issue actions

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