Skip to content

fix: assign data provider after $connector function are defined#9625

Merged
vursen merged 3 commits into
mainfrom
fix/9622-hidden-combobox-items
Jun 29, 2026
Merged

fix: assign data provider after $connector function are defined#9625
vursen merged 3 commits into
mainfrom
fix/9622-hidden-combobox-items

Conversation

@Artur-

@Artur- Artur- commented Jun 26, 2026

Copy link
Copy Markdown
Member

The connector assigned comboBox.dataProvider near the start of initLazy, before $connector.requestPage and the other $connector functions were defined. Since Vaadin 25.2 the web component runs the dataProvider property observer synchronously, so the assignment immediately triggered a first-page load that called back into $connector.requestPage while it was still undefined. The resulting error aborted connector initialization, leaving the dropdown stuck on the loading spinner with empty items.

Assign the data provider last, after all $connector functions exist, so the synchronous first-page load can safely call back into the connector.

Fixes #9622

@Artur-
Artur- marked this pull request as ready for review June 26, 2026 12:45
@vursen
vursen self-requested a review June 28, 2026 05:54
The connector assigned comboBox.dataProvider near the start of initLazy,
before $connector.requestPage and the other $connector functions were
defined. Since Vaadin 25.2 the web component runs the dataProvider
property observer synchronously, so the assignment immediately triggered
a first-page load that called back into $connector.requestPage while it
was still undefined. The resulting error aborted connector
initialization, leaving the dropdown stuck on the loading spinner with
empty items.

Assign the data provider last, after all $connector functions exist, so
the synchronous first-page load can safely call back into the connector.

Fixes #9622
@vursen
vursen force-pushed the fix/9622-hidden-combobox-items branch from f67678b to e3f222e Compare June 29, 2026 10:07
@vursen vursen changed the title fix: load items in initially hidden combo box fix: assign data provider after $connector function are defined Jun 29, 2026
vursen and others added 2 commits June 29, 2026 14:11
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vursen
vursen enabled auto-merge June 29, 2026 10:14
@vursen
vursen added this pull request to the merge queue Jun 29, 2026
@sonarqubecloud

Copy link
Copy Markdown

Merged via the queue into main with commit a6b4bb8 Jun 29, 2026
18 checks passed
@vursen
vursen deleted the fix/9622-hidden-combobox-items branch June 29, 2026 10:28
vursen added a commit that referenced this pull request Jun 29, 2026
… (#9635)

This PR cherry-picks changes from the original PR #9625 to branch 25.2.
---
#### Original PR description
> The connector assigned comboBox.dataProvider near the start of
initLazy, before $connector.requestPage and the other $connector
functions were defined. Since Vaadin 25.2 the web component runs the
dataProvider property observer synchronously, so the assignment
immediately triggered a first-page load that called back into
$connector.requestPage while it was still undefined. The resulting error
aborted connector initialization, leaving the dropdown stuck on the
loading spinner with empty items.
> 
> Assign the data provider last, after all $connector functions exist,
so the synchronous first-page load can safely call back into the
connector.
> 
> Fixes #9622
>

Co-authored-by: Artur Signell <artur@vaadin.com>
Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Initially hidden ComboBox do not load items since vaadin 25.2.0

3 participants