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

autoload={true} doesn't call asyncOptions handler #279

Closed
iam4x opened this issue Jun 29, 2015 · 6 comments · Fixed by #280
Closed

autoload={true} doesn't call asyncOptions handler #279

iam4x opened this issue Jun 29, 2015 · 6 comments · Fixed by #280

Comments

@iam4x
Copy link
Contributor

iam4x commented Jun 29, 2015

Code example:

<Select
          {...this.props}
          value={this.state.value}
          asyncOptions={this._getOptions}
          onChange={this._handleChange}
          autoload={true} />

(NOTE: I use ES7 async/await into this._getOptions)

@iam4x
Copy link
Contributor Author

iam4x commented Jun 29, 2015

After investigation, this.setState callback in componentWillMount from lib/Select.js is never called in my code. Is this specific to me? I'm using React ES6 Classes.

(linked to #201 fix)

@iam4x
Copy link
Contributor Author

iam4x commented Jun 29, 2015

Okey this is a ReactJS bug, facebook/react#1740

@iam4x
Copy link
Contributor Author

iam4x commented Jun 29, 2015

PR submitted

@ivome
Copy link

ivome commented Jun 29, 2015

+1 I'm having the same issue here

@ashervb
Copy link

ashervb commented Jul 1, 2015

Same issue and not using ES6/7. PR fixes the issue.

@shriah
Copy link

shriah commented Jul 3, 2015

calling asyncOptions handler inside componentWillMount also breaks the server side rendering because it fails on setState

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

Successfully merging a pull request may close this issue.

4 participants