React-select: Creatable doesn't work with getOptionValue and getOptionLabel props

Created on 12 Jan 2020  路  2Comments  路  Source: JedWatson/react-select

When using Creatable component with getOptionValue and getOptionLabel props, the functionality to create new options does not work.

creatable_issue

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 }) )

Most helpful comment

Using getNewOptionData fixed this for me.

All 2 comments

Using getNewOptionData fixed this for me.

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pablote picture pablote  路  3Comments

MindRave picture MindRave  路  3Comments

batusai513 picture batusai513  路  3Comments

Meesam picture Meesam  路  3Comments

yrabinov picture yrabinov  路  3Comments