Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<SelectField> and <AsyncSelectField> passes value in different format #2545

Open
jaikumar-tj opened this issue Jun 28, 2023 · 1 comment
Open

Comments

@jaikumar-tj
Copy link
Contributor

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.

Screenshot 2023-06-28 at 11 39 16

To Reproduce
Steps to reproduce the behavior:

  1. render both and using the same default options
  2. click on any option
  3. see the "event" object passed in onChange method

Screenshots
Screenshot 2023-06-27 at 20 15 22

Additional context
Either the code needs to changed or the storybook description needs to updated to indicate the correct value for target.value

@kark
Copy link
Contributor

kark commented Jun 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants