I'm trying to implement HTML5 datalist element in a easiest possible way.
Something like this:
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
This does not work however. What would be my next step without having to install (npm) additional stuff.
Basically, I'm using the plain input react element and want to embed the datalist.
Here is my react code:
<input className={"custom_input inline "+this.isValidInteger(this.props.price.price_first,0,2000000)}
style={{marginRight:'5px'}}
value={this.props.price.price_first || ''} type="text"
onChange={(e)=>this.props.dispatch({type:"price", payload:e.target.value})}
placeholder=" Unesite..."
maxLength="10"/>
So I would like a dropdown on top of that.
Dom
elements byreactjs
- facebook.github.io/react/docs/dom-elements.html – Triceps