Creatable doesn't work with getOptionValue and getOptionLabel props
See original GitHub issueWhen using Creatable
component with getOptionValue
and getOptionLabel
props, the functionality to create new options does not work.
Sandbox simple example here: https://codesandbox.io/s/creatable-custom-label-value-xr63g
The current workarround I’m using is to map the options to { label, value }
format:
options.map( opt => ({ label: opt.name, value: opt.id }) )
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to set the value of react select by using getOptionLabel
I need to prefill the select label by the activeSort name and id object. I can do that using the value prop in...
Read more >React Select v1.x -> 2.x Upgrade Guide
Please open an issue if you need something clarified, or submit a PR if you ... If you don't use the controlled props,...
Read more >Autocomplete API - Material UI - MUI
Name Type Default
options * array
renderInput * func
autoComplete bool false
Read more >TypeScript - React Select
This is the type of the option passed into the options prop (or the options ... formatOptionLabel , getOptionLabel , getOptionValue , isOptionDisabled ......
Read more >getOptionValue - Code Search
packages/react-select/src/__tests__/Creatable.test.tsx · props = { ...BASIC_PROPS, ...props }; · const getOptionLabel = ({ title }: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using getNewOptionData fixed this for me.
should be re-opened, still happens