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

getOptionValue is called with wrong type #5899

Open
mahdix opened this issue Apr 27, 2024 · 0 comments
Open

getOptionValue is called with wrong type #5899

mahdix opened this issue Apr 27, 2024 · 0 comments
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@mahdix
Copy link

mahdix commented Apr 27, 2024

Thanks for using react-select!

If you are going to ask a question or want to propose a change or a new feature, then please don't file an issue for this.
Questions and feature requests have their own place in our discussions section.

Are you reporting a bug or runtime error?

react-select v5.8.0
react v18.2.0

I'm trying to use Creatable with getOptionLabel and getOptionValue. But when the "create ..." item wants to be shown, my getOptionValue is called with an unexpected input (I expect my own data type, but it is a string: 'Create item ...')

So, If I type something that does not exist in the options list, the "Create ..." label is not shown, instead it shows empty line.

image

Forked PoC: CodeSandbox

@mahdix mahdix added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

1 participant