Skip to content

[WC-3533]: Fix/combobox on change - #2379

Open
r0b1n wants to merge 2 commits into
mainfrom
fix/combobox-onChange
Open

[WC-3533]: Fix/combobox on change#2379
r0b1n wants to merge 2 commits into
mainfrom
fix/combobox-onChange

Conversation

@r0b1n

@r0b1n r0b1n commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Pull request type

Refactoring (e.g. file rename, variable rename, etc.)


Description

Previously we were calling the event defined as OnChange seprately from the attributes and associations. In the code we were calling it manually to emulate the framework behaviour because of some istorical reasons. At this moment analysis says that we can actually attach the onChange to attributes and association and make the framework handle this action automatically.

This is needed to mitigate the issue with a race condition between editing and calling actions. At the moment if association being edited is also part of the onCHange action parameters, the action (nanoflow) gets stale parameters, so when changing from Options 1 to Option 2 and then immediately calling manual onChange, the nanoflow gets Option 1, while user just changed Option 1 to Option 2.

This refactoring passes the responsibility of handing the race condition to the framework's built in functionality.

What is still broken

As I implemented this change, this revealed a possible bug in the framework where instead of stale parameter, the prameter is not passed at all. 😅 Waiting for the team to confirm if it's a bug on their side. For now one e2e test is expected to be broken.

What should be covered while testing?

Check that all existing OnChange actions are still working as expected for different types of attributes and association. This PR introduces e2e tests that cover majority of scenarios, there might be some I missed. Test pages are committed in the test project and stil lcompatible with 10.22, so you can check with old version of the widget.

@r0b1n
r0b1n requested a review from a team as a code owner August 12, 2026 14:12
@r0b1n r0b1n changed the title Fix/combobox on change [WC-3533]: Fix/combobox on change Aug 12, 2026
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.

1 participant