Skip to content

fix: make conditional editing work with lazy columns (#11405) (CP: 25.0)#11411

Merged
sissbruecker merged 2 commits into25.0from
cherry-pick-11405-to-25.0-1774431291987
Mar 25, 2026
Merged

fix: make conditional editing work with lazy columns (#11405) (CP: 25.0)#11411
sissbruecker merged 2 commits into25.0from
cherry-pick-11405-to-25.0-1774431291987

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #11405 to branch 25.0.


Original PR description

Description

The conditional editing logic needs to access the row from a cell element and currently uses cell.parentElement. When using lazy column rendering, cells are created eagerly when rendering rows but are not added to the row yet, so accessing parentElement does not return the row reference.

This changes the logic to use the __parentRow property, which is set when creating the cell.

Fixes vaadin/flow-components#8976

Type of change

  • Bugfix

* fix: make conditional editing work with lazy columns

* fix tests

* handle cell editor navigation when using lazy column rendering

* make getEventContext work with lazily rendered cells

* stop editing when edited cell is scrolled out of view
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +373 to +377
// Scroll column into view synchronously, which also triggers lazy column
// rendering to ensure cells for that column are in the DOM.
this._scrollHorizontallyToCell(column._headerCell);
this.__updateHorizontalScrollPosition();
this.__updateColumnsBodyContentHidden();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

scrollToColumn is not available in 25.0, so I replaced the call with what it essentially does in 25.1.

@sissbruecker sissbruecker merged commit f906cc2 into 25.0 Mar 25, 2026
10 checks passed
@sissbruecker sissbruecker deleted the cherry-pick-11405-to-25.0-1774431291987 branch March 25, 2026 11:20
@vaadin-bot
Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.0.8.

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.

3 participants