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

125
Views
how do i map over items in an input feild?

I am making a form that sends over the shipping details of a user . I am however finding it difficult to map over the shipping other in an input field that is immutable(read only). I keep getting this in the input field [object, object] in the browser . I want the details of the objects to show instead.

Here is a snippet of the code

<div class="telephone">
                <label for="name"></label>
                <input
                  type="text"
                  name="username"
                  value={items.map((item, id) => (
                    <Payment
                      key={id}
                      name={item.name}
                      price={item.price}
                      itemSize={item.itemSize}
                      count={item.count}
                    />
                  ))}
                  readonly
                />
              </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

HTML input types are expecting text as value and you are passing JSX component to it, that's why it's displaying [Object, object]. Not sure what you want to achieve, but input type='text' need text as value.

https://www.w3schools.com/tags/tag_input.asp

about 4 years ago · Juan Pablo Isaza Report
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!