Components: Set a default for the ComboboxControl onFilterValueChange #28492
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
While using the the
ComboboxControl
I noticed that there were errors stating thatonFilterValueChange
was undefined. Looking at the example in Storybook, it seems that this was probably required in the past, and was a way for the logic of how the suggestions are filtered, to be handled outside of the combobox.This can safely be set to a no-op function and the control works as expected. This PR sets that as the default and updates the Storybook example so that it shows the simplified usage.
How has this been tested?
This has been manually tested, in the block I'm developing and using Storybook. The frontend functionality remains unchanged.
Types of changes
This should probably be categorised as a bug fix. The
onFilterValueChange
prop can be optional, but would cause an error if omitted.Checklist: