Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!