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

FormsyAutoComplete does not use provided default value #230

Open
julesyoungberg opened this issue Aug 10, 2017 · 2 comments
Open

FormsyAutoComplete does not use provided default value #230

julesyoungberg opened this issue Aug 10, 2017 · 2 comments

Comments

@julesyoungberg
Copy link

When I provide a defaultValue prop to FormsyAutoComplete the value does not get rendered. I think this is because of line 82 in FormsyAutoComplete.jsx and I believe it would be fixed if value={this.state.value} is changed to searchText={this.state.value}.

This is with version 0.6.2, material-ui version 0.18.6 and used like this:
<FormsyAutoComplete name="example" floatingLabelText="How often do you?" dataSource={[ 'Never', 'Every Night', 'Weeknights' ]} defaultValue="Never" />

@ryanblakeley
Copy link
Collaborator

ryanblakeley commented Aug 12, 2017

That sounds like the right fix. It looks like the AutoComplete component from Material sets value on it's own via that searchText prop.

cc: #231

@Sohailahmad7692
Copy link

Hi folk, I am not able to set an initial default value on FormsyAutoComplete. Is there any way, to fix this issue?

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

3 participants