Skip to content

header.getResizeHandler() sets column size to null after it is resized to 0 #6209

@zanenkn

Description

@zanenkn

TanStack Table version

8.21.3

Framework/Library version

React v18.3.1

Describe the bug and the steps to reproduce it

When a column’s minSize is set to 0 and the column is resized all the way down to 0px width, it becomes impossible to resize it again. The column appears to get stuck at width 0.

From debugging, this seems to happen because the resize handler sets the column size to null when the size reaches 0.

Steps to Reproduce

  1. Open the provided CodeSandbox (fork of the official Column Resizing Performant example here, only difference is that defaultColumn.minSize is set to 0 in useReactTable)
  2. Resize any column down to width of 0px.
  3. Try to resize the same column back to a width greater than 0.

Expected Behavior


The column should be resizable again after reaching width 0.

Actual Behavior

Once the column width reaches 0, it cannot be resized anymore.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/devbox/headless-meadow-crkwkc

Screenshots or Videos (Optional)

No response

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.

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

    Issue actions