I have a datalist
, which I use like this:
<input id="estabelecimento" list="listaEstabelecimento"/>
<datalist id="listaEstabelecimento">
<option value="valor1" label="label1"></option>
</datalist>
I use this component to make the autocomplete
effect. In the code, I use $("#estabelecimento").val()
to filter the data. Using $("#estabelecimento").val()
it returns me label1
. How do I get valor1
? I need it too.