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

When multi=true, drop down list doesn't display after adding one option #122

Closed
jtadmor opened this issue Apr 7, 2015 · 3 comments
Closed
Milestone

Comments

@jtadmor
Copy link

jtadmor commented Apr 7, 2015

It seems that once one option is selected, the option list no longer displays when the caret icon is clicked, and requires that the user begin to type in order to see it. This seems to hold for both async option loading and just passing in an array.

@pollen8
Copy link

pollen8 commented Apr 20, 2015

Similar thing for me.
I noticed that if I add value="" to the select then it starts working again. However, when you load up the select its populated with a tag ''.

@pollen8
Copy link

pollen8 commented Apr 20, 2015

ok this was my fault. I was using

<Select required name="contact-name" asyncOptions={getOptions} onChange={self.updateValue} style={{width: '100%'}} multi={true} ref="contacts" />

and at the same time in updateValue() I was altering this.state.contacts

As soon as I changed that to this.state.contactsSelected things started working again:

updateValue: function (newValue) {
        var c = this.state.contactsSelected.slice();
        c.push(newValue)
        this.setState({ 'contactsSelected': c })
    },

I guess that react-select is using state.contacts internally?

@dcousens
Copy link
Collaborator

dcousens commented May 7, 2015

Possibly related to #70, will investigate

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

4 participants