-
Notifications
You must be signed in to change notification settings - Fork 16
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
defaultValue prop does not work on Autocomplete #244
Comments
The defaultValue prop was not being used, which resulted in it not working. Closes digipolisantwerp#244
Hi, Thanks for the respons and sorry for my late answer. I dug through our code a bit more and tried to isolate the issue: Issues I've foundI managed to bring it down to 2 core issues: 1. Async
|
Indeed, this looks like a bug. If defaultValue is undefined and later defined when the user has not picked a value yet, the AutoComplete should update itself, but it does not. You can work around it by reinitializing the component when defaultValue changes:
|
Setting the
defaultValue
prop on an<Autocomplete />
component does nothing. At first glance it looks like that prop is not being used inside theAutocomplete.jsx
file at the moment, except for assigning it to the state.To Reproduce
Steps to reproduce the behavior:
Autocomplete
component with thedefaultValue
propplaceholder
by default.Expected behaviour
Expected the
Autocomplete
component to display thedefaultValue
prop by defaultOS (please complete the following information):
The text was updated successfully, but these errors were encountered: