React-select: Single select propagates an array instead of an object in onChange()

Created on 10 Mar 2017  路  6Comments  路  Source: JedWatson/react-select

I have a <Select> component with { multi: false, searchable: true }. Firstly I selected an option, and when I pressed backspace, it deleted the value and propagated the new value in onChange(). However, the new value is an empty array instead of null or something else.

I got a warning when setting the new value to <Select>, it says:

Warning: Failed prop type: Invalid prop value of type array supplied to Value, expected object.
    in Value (created by Select)
    in Select

Most helpful comment

@gao-sun This will be resolved by #773

All 6 comments

@gao-sun This will be resolved by #773

@MrLeebo any idea when this will be merged? :)

@nealoke It's not up to me. I'd certainly like to see it merged since I'm getting emails about it every couple of weeks for the last year. Perhaps @agirton can help?

@MrLeebo aah sorry my bad, I thought you had commit rights as you are listed as _contributor_ :) Must be annoying xD

I would love if it was merged. Life would be easier if you could just rely on the same behaviour of both backspace and clear button.

Hello -

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

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request 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

coder-guy22296 picture coder-guy22296  路  3Comments

batusai513 picture batusai513  路  3Comments

pashap picture pashap  路  3Comments

joshualimpj picture joshualimpj  路  3Comments