Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

142
Visualizações
Show label instead of option value in input datalist

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.

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda