Skip to content

Error Cannot read properties of undefined (reading 'index') when using enableColumnPinning with enableColumnVirtualization #1474

@workvdoroshko-ui

Description

@workvdoroshko-ui

material-react-table version

v.3.2.1

react & react-dom versions

v19.1.1.

Describe the bug and the steps to reproduce it

Error Cannot read properties of undefined (reading 'index') when using enableColumnPinning with enableColumnVirtualization

Steps to Reproduce:

  1. Navigate to the grid.
  2. Open column settings and hide all columns via Show/Hide Columns.
  3. Enable one column (ensure at least three columns remain hidden before this one).
  4. Start pinning columns to the right (from the upper one).

ER: Corresponding columns are hidden

AR: When it comes to active column, paper disappears and console shows: Cannot read properties of undefined (reading 'index').

Minimal, Reproducible Example - (Optional, but Recommended)

Steps to Reproduce:

  1. Navigate to the grid.
  2. Open column settings and hide all columns via Show/Hide Columns.
  3. Enable one column (ensure at least three columns remain hidden before this one).
  4. Start pinning columns to the right (from the upper one).

Screenshots or Videos (Optional)

Image

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

None

Terms

  • I understand that if my bug cannot be reliably 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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions