React material ui select all checkbox
I need to make that when selecting checkbox Select All, the rest of the checkboxes from the list are checked, and each checkbox can be selected separately. But when select one of the checkboxes does not checked the previous checkbox. sandbox const options = [ 'Selected Item 1', 'Selected Item 2', 'Selected Item 3']; export default function App() { const [selected, setSelected] = useState([]); const isAllSelected = options.length > 0 && selected.length === options.length; const handleChange = (event) => { const value = event.target.value; console.log(value) if (value === "all") { setSelected(se
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.