I send the value
value to onChange to the input, but I want the value
shown in the input to show the label
value, not the value
.
return (
<input
type="text"
list="MaterialList"
name="MaterialId"
/>
<datalist id="MaterialList">
<option label="hi" value="0" />
<option label="hi2" value="1" />
<option label="hi3" value="2" />
<option label="hi4" value="3" />
</datalist>
)
The value should be there because we will need the value
value by adding a button later.
I want to make the label
show instead of the value
value being printed on the input tag, but I don't know how to do it.