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
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.