ui-kit
ui-kit copied to clipboard
<SelectField> and <AsyncSelectField> passes value in different format
Describe the bug
The onChange callback for AsyncSelectField and SelectField is passing "value" in a different format. The storybook description says the "target.value" will hold the value but its not the case for AsyncSelectField.
To Reproduce Steps to reproduce the behavior:
- render both <SelectField> and <AsyncSelectFIeld> using the same default options
- click on any option
- see the "event" object passed in
onChangemethod
Screenshots
Additional context
Either the code needs to changed or the storybook description needs to updated to indicate the correct value for target.value
Hey 👋,
Thank you for reporting.
Just to share some additional context - this issue can also be observed in other components. onChange in:
- SelectableSearchInput behaves like in SelectInput/SelectField in that regard
- AsyncCreatableSelectInput and CreatableSelectInput behaves like in AsyncSelectInput/AsyncSelectField