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

126
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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