Skip to content

Datatable: Left Position incorrect with scroll + frozen + toggle columns #8504

@cbaum86

Description

@cbaum86

Describe the bug

When using frozen columns in combination with toggle columns and a horizontally scrollable datable the left position of the cells is incorrectly calculated when showing/hiding columns.

When adding columns which cause horizontal scroll the frozen columns in the body have an increased value added to the left style properly added to the cell which cause them to be out of alignment and for the scrolled content to be visible in the 'gap' to the left.

The left style value applied to the and cells are different. seems to be applied correctly.

Image

Reproducer

https://codesandbox.io/p/sandbox/festive-tu-8l54fm

System Information

System:
    OS: macOS 26.3
    CPU: (10) x64 Apple M4
    Memory: 21.77 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.5.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 11.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 145.0.7632.77
    Firefox: 146.0
    Safari: 26.3
  npmPackages:
    primereact: ^10.9.7 => 10.9.7
    react: ^19.1.0 => 19.1.1

Steps to reproduce the behavior

No response

Expected behavior

The tbody cells should align correctly using the inline applied style > left as per the thead cells.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions