Skip to content

Datagrid column header sort clicks broken after horizontal scroll #3097

@paulkangas

Description

@paulkangas

Bug Report

Steps to Reproduce:

Reproducible via hosted example at https://perspective-dev.github.io/

  1. In the viewer on the datagrid plugin, add enough columns to require horizontal scrolling (easily achievable with expression columns)
  2. Scroll to the right
  3. Click on the right most column header to order by it. Data in the grid will do a sort of jump
  4. Scrolling back to the left and trying to order by columns on the left by clicking on the headers is impossible
  5. Can recover from this state by ordering on columns somewhere in the middle or using the configuration panel

Cannot click on the "chg (-)" column header in this image after following steps 1-3
Image

Expected Result:

Clicking on datagrid column headers should always cycle order by for that column

Actual Result:

After getting in broken state: cannot order by some column headers. Clicking on left-side column headers after scrolling has no effect on sort order.

Environment:

  • Browser: Chrome 143.0.7499.110 (Official Build) (arm64)
  • OS: macOS Sequoia 15.6.1
  • Chip: Apple M2 Pro
  • @perspective-dev/client version: (using hosted example at perspective-dev.github.io)

Additional Context:

Bug is reproducible on the official hosted demo. The issue appears to be related to horizontal scroll position affecting click detection on column headers. After sorting by a column on the far right, the click targets for column headers on the left side of the grid seem to be offset or unresponsive.

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