Skip to content

fix: update frozen cell positions when grid direction changes - #13186

Merged
tomivirkki merged 10 commits into
mainfrom
fix/grid-frozen-to-end-column-is
Oct 20, 2026
Merged

tomivirkki merged 10 commits into
mainfrom
fix/grid-frozen-to-end-column-is

Conversation

@tomivirkki

Copy link
Copy Markdown
Member

When the direction changes while a grid is shown, the frozen cells keep the transforms that were calculated for the previous direction.

Kapture.2026-10-20.at.09.40.07.mp4

These transforms place the frozen-to-end cells outside the table and increase its scroll width, so recalculating the scroll position is not enough on its own: the transforms have to be reset first.

  • Reset the transforms of the frozen and frozen-to-end cells and recalculated their positions when the dir of the grid changes
  • Added a test that switches the direction and checks that the frozen-to-end cells stay inside the grid

Type of change

  • Bugfix

@tomivirkki
tomivirkki marked this pull request as draft October 20, 2026 08:01
@tomivirkki
tomivirkki marked this pull request as ready for review October 20, 2026 08:02

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes — left 1 comment.

Finding
⚠️ Only the cell transforms are reset, the header/footer/items transforms are also stale when scrollWidth is measured

Comment thread packages/grid/src/vaadin-grid-mixin.js Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes — left 2 comments.

Finding
⚠️ With lazy column rendering the direction change still leaves cells mispositioned
🧪 The frozen (start) cell half of the fix has no test coverage

Comment thread packages/grid/src/vaadin-grid-mixin.js Resolved
tomivirkki and others added 4 commits October 20, 2026 11:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomivirkki
tomivirkki force-pushed the fix/grid-frozen-to-end-column-is branch from 0af25f5 to 6bec4c5 Compare October 20, 2026 08:42
Comment thread packages/grid/src/vaadin-grid-mixin.js Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tomivirkki and others added 3 commits October 20, 2026 12:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@tomivirkki
tomivirkki merged commit a4124f4 into main Oct 20, 2026
21 checks passed
@tomivirkki
tomivirkki deleted the fix/grid-frozen-to-end-column-is branch October 20, 2026 11:01
web-padawan pushed a commit that referenced this pull request Oct 20, 2026
#13194)

Co-authored-by: Tomi Virkki <tomivirkki@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.4.0-alpha4.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants