Best Approach for a "Check All"/"Uncheck All" Button #841
Replies: 1 comment
-
Better way: const handleCheckAll = () => {
form.update({ name: fields.steps.name, value: stepOptions });
};
const handleUncheckAll = () => {
form.update({ name: fields.steps.name, value: [] });
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a list of steps for a user to check which ones they want, but I want to add a "Check All" and "Uncheck All" button. I've got this approach, and it works, but I'm wondering if it's best practice:
I was using
useInputControl
, but it was in a callback and broke the rules of hooks.Beta Was this translation helpful? Give feedback.
All reactions