Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda