Repository navigation
Vaadin Flow Components V25.2.2
Vaadin Flow Components 25.2.2
This is a release of the Java integration for Vaadin Components to be used from the Java server side with Vaadin Flow.
Changes in Flow Components from 25.2.1
Changes in All Components
Changes in vaadin-ai-components-flow
- Breaking Changes:
-
⧉ Switch form filler value options to items-based resolution (#9564) (CP: 25.2). PR:9627
This PR cherry-picks changes from the original PR #9564 to branch 25.2. --- #### Original PR description > ## Description > > In form filler DX test sessions, the return type of value options APIs was a pain point. Even after updating examples and clarifying it in the documentation, it still was not intuitive: the developer had to think in labels (strings) when the rest of their codebase thought in domain objects, and had to supply a
toValueconverter that re-encoded the label-to-value mapping the field'sItemLabelGeneratoralready expressed. > > This PR replaces that shape with an items-based resolution path: > > - Registrations now carry the domain objects, not pre-rendered labels. Aligned with how the rest of the codebase models selection options. > - Labels for the LLM are derived through oneItemLabelGenerator. By default, the controller reflects the field's ownsetItemLabelGenerator(...)so common cases need no extra wiring; an explicit one can be supplied onValueOptionsfor custom components or cases where the LLM should see a different label than the UI. > - When the LLM picks a label, the controller walks the registration's items, applies the same generator per item, and writes the first matching item to the field. The bijection lives in one place — the label generator — and thetoValueconverter is no longer needed and has been removed. > > Changed inValueOptions: > -options(Collection<String>)→options(Collection<V>)> -options(BiFunction<String, Integer, List<String>>)→options(BiFunction<String, Integer, List<V>>)> > New inValueOptions: > -itemLabelGenerator(ItemLabelGenerator<V>)— optional; falls back to the field's own labeler, then toString.valueOf(item). > > Changed inFormAIController: > -fieldValueOptions(ValueOptions<String>)→fieldValueOptions(ValueOptions<V>)> -fieldValueOptions(ValueOptions<V>, Function<String, V> toValue)removed. > > Other behavior: > - Items with duplicate labels resolve to the first in registration order; a fixed-options registration logs a warning at registration so the developer notices. > - A query-modefill_formthat arrives before anyquery_field_optionscall is rejected with a reason namingquery_field_optionsso the LLM can recover on the next turn. > > > [!WARNING] > > The two-argumentfieldValueOptions(ValueOptions, Function<String, V>)overload and theString-only generics on the single-argument variant are gone. > > Based on DX test findings. > > No related issue. > > ## Type of change > > - [ ] Bugfix > - [x] Feature > > ## Checklist > > - [x] I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview > - [x] I have added a description following the guideline. > - [ ] The issue is created in the corresponding repository and I have referenced it. > - [x] I have added tests to ensure my change is effective and works as intended. > - [x] New and existing tests are passing locally with my change. > - [x] I have performed self-review and corrected misspellings. > - [ ] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.
-
Changes in vaadin-combo-box-flow
-
Breaking Changes:
-
⧉ Update multi-select-combo-box to synchronize on change (#9631) (CP: 25.2). PR:9683
This PR cherry-picks changes from the original PR #9631 to branch 25.2. --- #### Original PR description > ## Description > > Fixes #9611 > > With
@Pushand two push frames around a server-sidesetValue, MultiSelectComboBox could reset its value to empty because theselected-items-changednotification also fires for programmatic changes and gets echoed back as a spurious client value change. > > - Synchronized the value on the web componentchangeevent instead ofselected-items-changed, so only genuine user gestures are treated as client changes > - Updated TestBench helpers to dispatchchange(anddeselectAllto useclear()) > - Added integration tests for the push scenario and user value commits > > > [!WARNING] > > Client-side changes to the web componentselectedItemsproperty no longer synchronize to the server unless achangeevent is dispatched. Server-sidesetValueand end-user interactions are unaffected. > > ## Type of change > > - Behavior altering fix > > --- > > 🤖 Generated with Claude Code >
-
-
Fixes:
-
⧉ Assign data provider after $connector function are defined (#9625). PR: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 >
-
Changes in vaadin-context-menu-flow
Changes in vaadin-grid-flow
- Fixes:
-
⧉ Render grid data when cache is populated before attach (CP: 25.2). PR:9704
This PR cherry-picks changes from the original PR #9689 to branch 25.2. The connector on this branch doesn't have
resolvePendingCallbacks, so the fix sets_hasDatain$connector.confirminstead, which is where pending callbacks are resolved here. --- > 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_hasDataproperty. After attaching, the grid then doesn't render the cached rows (the_flatSizeChangedobserver only updates the virtualizer when_hasDatais set) and also sends an unnecessary data request to the server. This change makes the connector set_hasDatawhen resolving pending callbacks, which covers this case since populating the cache always ends with aconfirmcall. > > Fixes #9674 -
⧉ Keep scroll position when setting item selectable provider (#9644). PR:9654
This PR cherry-picks changes from the original PR #9644 to branch 25.2. --- #### Original PR description > This PR changes
setItemSelectableProviderto userefreshViewport()instead ofdataCommunicator.reset()to avoid resetting TreeGrid's scroll position and adds a corresponding test toTreeGridScrollPositionIT. -
⧉ Keep scroll position when toggling Grid enabled state (#9649). PR:9650
This PR cherry-picks changes from the original PR #9649 to branch 25.2. --- #### Original PR description > This PR changes
onEnabledStateChangedto userefreshViewport()instead ofdataCommunicator.reset()to avoid resetting TreeGrid's scroll position and adds a corresponding test toTreeGridScrollPositionIT. >
-