You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
r0b1n
changed the title
fix(combobox-web): WC-3314 [Combobox] Mitigate issue with empty string to executeAction()
[WC-3314] Combobox: mitigate issue with empty string to executeAction()
Jul 3, 2026
Low — filterValue || undefined coerces all falsy values, not just empty string
File:packages/pluggableWidgets/combobox-web/src/hooks/useGetSelector.ts line 16
Problem:filterValue || undefined converts any falsy value to undefined, not just "". For the current string | undefined type this is correct in practice, but an explicit check better documents intent and is immune to future type widening.
Problem: There is no unit test asserting that an empty-string filterValue causes execute to be called with { filterInput: undefined }. Without a test the bug can silently regress.
Fix: Add tests using actionValue() from @mendix/widget-plugin-test-utils:
it("passes undefined when filterValue is empty string",()=>{constaction=actionValue();onInputValueChange(action,"");expect(action.execute).toHaveBeenCalledWith({filterInput: undefined});});it("passes value through when filterValue is non-empty",()=>{constaction=actionValue();onInputValueChange(action,"foo");expect(action.execute).toHaveBeenCalledWith({filterInput: "foo"});});
Positives
CHANGELOG entry is user-facing only with no implementation detail leakage.
Fix correctly checks canExecute and isExecuting before calling execute(), following the Mendix ActionValue contract.
The change is minimal and surgical — only the one offending argument is touched.
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
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.
filterValuetoundefinedbefore passing toonChangeFilterInputEvent.execute()to prevent widget crashThere is a test project in related WTF story. Check that after the change there is not crash when input is cleared.