Skip to content

fix: render grid data when cache is populated before attach#9689

Open
vursen wants to merge 2 commits into
mainfrom
fix/grid-has-data-before-attach
Open

fix: render grid data when cache is populated before attach#9689
vursen wants to merge 2 commits into
mainfrom
fix/grid-has-data-before-attach

Conversation

@vursen

@vursen vursen commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

When the connector receives data while the grid is still detached from the DOM, for example when a grid is rendered inside another grid's component renderer, there is no data provider call, so nothing sets the grid's _hasData property. After attaching, the grid then doesn't render the cached rows (the _flatSizeChanged observer only updates the virtualizer when _hasData is set) and also sends an unnecessary data request to the server. This change makes the connector set _hasData when resolving pending callbacks, which covers this case since populating the cache always ends with a confirm call.

Note

The new client-side test also requires vaadin/web-components#12035, which stops the web component from discarding items added to its cache before attach. The test will keep failing until that fix is included in a platform alpha and the version is bumped here.

Fixes #9674

vursen and others added 2 commits July 7, 2026 14:01
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vursen vursen changed the title fix: render grid data when cache is populated before attach fix: render items when cache is populated before attach Jul 7, 2026
@vursen vursen changed the title fix: render items when cache is populated before attach fix: render grid data when cache is populated before attach Jul 7, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

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.

TreeGrid content in Grid cell only renders after interaction with the Grid

1 participant