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

207
Views
How to access checked property of a material UI <Checkbox/> and set it equal to false when pressing another icon (delete icon)?

I hope you are all doing great! I have a question and it would be amazing if someone could give me some information or direction on how to tackle my problem.

My problem is how to access the checked property of a material-ui <Checkbox checked={}/> component and set it equal to false or in other words, toggle it off when pressing a button. My problem is that the delete icon (button) exists in another file which means it is a different component. Furthermore, the button's onClick={} event has a property onClearSelected which is responsible of erasing strings inside looking like cells.

Further, I hope that I gave you some insight and I did not confuse you further. I would be glad to answer to any questions and I am sorry in advance if it is hard for you to understand what I am trying to imply.

Sincerely, Nikolaos

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To manipulate checkbox you can simply use a ref, see useRef() in React docs.

To make a component alter something in a different component by a button click, you need to declare the ref in their common parent, then pass the ref to checkbox, either with prop drilling or a context.

Also in the parent component, create a function that unchecks the checkbox. Pass it down to the button, again with either prop drilling or with a context.

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!