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

150
Views
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
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!