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

160
Visualizações
ReactJS Checking all the checkboxes inside the list item components from outside the component

Hi my problem is I have two components; a list component and a list item component. This list item component has a checkbox. I am creating a list out of this cards I have designed and putting this list component inside a page. Below is an image describing what I am trying to do. I want to have an option to select all the checkboxes. Problem is I don't really know how to go down all the components and check their boxes.

The cards have props for the items they are holding. So I thought of putting a property in them like "isSelectAll" and if that is true the checkbox is selected but if it is false checkbox contains its independent value.

But I wanted to know if there is any better way than this because it seems not efficient. Perhaps with some type of a react hook?

What I want to do

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