Dear Community,
Ant Design is an awesome ui system and we've been using it extensively for the past few months.
Thank you for designing and open sourcing this lib.
--
I need to clear the AutoComplete component after the form has been submitted.
I have tried to do the following :
...
<AutoComplete ref='toField' />
...
// In a callback
this.refs.toField.value = null;
But it isn't working. How can this be done ?
Thanks.
Do not use ref to control component state, use React state.
http://facebook.github.io/react/docs/forms.html#controlled-components
@afc163 Thank you.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment
Do not use ref to control component state, use React state.
http://facebook.github.io/react/docs/forms.html#controlled-components
http://codepen.io/afc163/pen/MbQXRV?editors=001