fix!: update multi-select-combo-box to synchronize on change#9631
Merged
Conversation
37d4ab4 to
31673d6
Compare
Synchronize the value on the web component `change` event instead of the `selected-items-changed` property notification. That notification also fires for programmatic (server-set) changes, which - with @Push and two push frames around setValue - could echo a stale empty value back as a spurious client-initiated value change. The `change` event fires only on genuine user value commits, so only real user gestures are treated as client changes. BREAKING CHANGE: client-side changes to the web component `selectedItems` property no longer synchronize to the server unless a `change` event is dispatched. Normal server-side setValue and end-user interactions are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31673d6 to
c7266b1
Compare
vursen
reviewed
Jul 6, 2026
vursen
reviewed
Jul 6, 2026
- Add unit test asserting the value synchronizes on the change event - Reduce integration tests to cover value propagation via the TestBench element helpers - Use Java text blocks for the TestBench element scripts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7ab1cb0 to
99c8fff
Compare
TestBenchElement.getText() already waits for the pending server round trip via waitForVaadin(), so the extra explicit wait was redundant. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
vursen
reviewed
Jul 6, 2026
…BoxValueChangeIT The two IT classes covered mostly the same client value change scenarios. Move the one scenario that was missing (deselectAll) into the existing class and remove the duplicate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
vursen
approved these changes
Jul 6, 2026
|
Collaborator
|
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 25.1, i have encountered the following issue. Can you take a look and pick it manually? |
sissbruecker
pushed a commit
that referenced
this pull request
Jul 6, 2026
…(CP: 25.2) (#9683) This PR cherry-picks changes from the original PR #9631 to branch 25.2. --- #### Original PR description > ## Description > > Fixes #9611 > > With `@Push` and two push frames around a server-side `setValue`, MultiSelectComboBox could reset its value to empty because the `selected-items-changed` notification also fires for programmatic changes and gets echoed back as a spurious client value change. > > - Synchronized the value on the web component `change` event instead of `selected-items-changed`, so only genuine user gestures are treated as client changes > - Updated TestBench helpers to dispatch `change` (and `deselectAll` to use `clear()`) > - Added integration tests for the push scenario and user value commits > > > [!WARNING] > > Client-side changes to the web component `selectedItems` property no longer synchronize to the server unless a `change` event is dispatched. Server-side `setValue` and end-user interactions are unaffected. > > ## Type of change > > - Behavior altering fix > > --- > > 🤖 Generated with Claude Code > Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
sissbruecker
pushed a commit
that referenced
this pull request
Jul 7, 2026
…1) (#9686) This PR cherry-picks changes from the original PR #9631 to branch 25.1. --- > ## Description > > Fixes #9611 > > With `@Push` and two push frames around a server-side `setValue`, MultiSelectComboBox could reset its value to empty because the `selected-items-changed` notification also fires for programmatic changes and gets echoed back as a spurious client value change. > > - Synchronized the value on the web component `change` event instead of `selected-items-changed`, so only genuine user gestures are treated as client changes > - Updated TestBench helpers to dispatch `change` (and `deselectAll` to use `clear()`) > - Added integration tests for the push scenario and user value commits > > > [!WARNING] > > Client-side changes to the web component `selectedItems` property no longer synchronize to the server unless a `change` event is dispatched. Server-side `setValue` and end-user interactions are unaffected. > > ## Type of change > > - Behavior altering fix > > --- > > 🤖 Generated with Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.changeevent instead ofselected-items-changed, so only genuine user gestures are treated as client changeschange(anddeselectAllto useclear())Warning
Client-side changes to the web component
selectedItemsproperty no longer synchronize to the server unless achangeevent is dispatched. Server-sidesetValueand end-user interactions are unaffected.Type of change
🤖 Generated with Claude Code