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

116
Visualizações
textarea loadedText not updating after Input

I am perplexed.

So, I have this textarea element that I am using as a note field. I have the text area load new defaultValues depending on what item is selected in a select. The select changes the state in the parent.

Each select objects look like this:

movie: { id: string; name: string; note: string}

When the select changes, I have a useState that changes to the new selection.

The idea is to be able to enter notes about each item in the select, and read the new notes when the item in the select changes. So the textarea takes the movie.note as its defaultValue.

This was working perfectly until I moved the select into its own FC and passed state into it from the parent.

After I moved the select to its own component, the notefield loads the notes for each item in the select UNTIL I edit one of the notes. Then it stops loading new notes at all. It still remains editable, but the loaded notes never update again after I type in the text area.

Again, this wasn't an issue until I moved the select into its own component, but what is weird is that all my other inputs load data from each item in the select perfectly, even after editing. And state is still updating correctly, and the correct notes are even being logged from the note component....just not displayed.

Any ideas on what the issue is here?

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