title :)
+1
As suggested in the original title, an inputProps prop that passes any attributes on to the input is probably the easiest solution here.
Related question, is there a workaround to set the input value in the textbox (not the placeholder text) on initial render?
@stevenqzhang: I'm assuming you mean just setting the input's text value and not the component's selected value. If so, the answer is currently no; more discussion here.
@ericgio Actually, setting the selected value is exactly what I wanted. It wasn't clear to me at first that I could set the selected value to an arbitrary value not in the autocomplete list. Thanks!
I have this exact requirement when using it as a controlled component.
If there's text present in the input when it's rendered again, even with new list and/or selected values, the input text is not cleared.
I have this exact requirement
@jasxir: not sure which requirement you're referring to, but you can clear the input with the clear method.
any news on this? I'd really need to be able to restrict the user input to only letters for ex. Suggestions?
I try to use onInputChange={this.props.method} but how to change the input value form there?
Thx!
Reading through @jasxir's issue again, it seems potentially related to #198. I should hopefully have a fix for that out soon-ish. As far as the ability to set the input props, that's going to take some work so I don't want to make any promises on a timeline.
inputProps prop added in v2.0.0-alpha.1. However, it does not allow you to set the input value, since that is controlled by the top-level component.
Most helpful comment
inputPropsprop added in v2.0.0-alpha.1. However, it does not allow you to set the inputvalue, since that is controlled by the top-level component.