Problem:
I’m having trouble implementing a “Select All” checkbox that controls the state (checked or unchecked) of multiple other checkboxes.
Desired Behavior:
- Clicking the “Select All” checkbox should:
- Check all other checkboxes if it’s currently unchecked.
- Uncheck all other checkboxes if it’s currently checked.
Technical Details:
- I’m using checkboxes with three possible states: “Checked,” “Unchecked,” and “Mixed”.
Question:
What’s the simplest way to achieve this behavior?