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

How to prefill select value when it is Async with fetch.js? #1166

Closed
ananddodia opened this issue Aug 22, 2016 · 2 comments
Closed

How to prefill select value when it is Async with fetch.js? #1166

ananddodia opened this issue Aug 22, 2016 · 2 comments

Comments

@ananddodia
Copy link

ananddodia commented Aug 22, 2016

@JedWatson - I Need your help. please reply to below issue I am facing.
If any one else knows solution to this problem please help me.
I have made Async select with fetch.js. How can I make it prefilled when its in edit form scenario?
below is my code
<Select.Async name={name} value={this.state.city} className={className} id={id} ref={ref} loadOptions={this.getCity} placeholder={placeholder} onChange={this.updateValue} autosize={false} clearable={false} minimumInput={1} backspaceRemoves={false} />

value and label is already available from parent component.

@bvaughn
Copy link
Collaborator

bvaughn commented Sep 18, 2016

FYI I am working on a refactor for Async that should address this issue. (See PR #1226)

Once it's done, setting a value (as you've shown above) will work for initializing Async.

@bvaughn
Copy link
Collaborator

bvaughn commented Sep 18, 2016

Resolved via PR #1226.

Look for an RC2 to come out (hopefully) sometime today with this change.

@bvaughn bvaughn closed this as completed Sep 18, 2016
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

2 participants