add checked to CheckboxElement or CheckboxButtonGroup
Closed this issue · 1 comments
j09876 commented
Hi
I have checked open issues and also the latest version.
How would I add a checked attribute to CheckboxElement or CheckboxButtonGroup?
I have tried to add the attribute to the element and also to use the defaultProps of the mui theme.
Thank you
sadik-malik commented
Checked prop is controlled by the react-hook-form in CheckboxElement and CheckboxButtonGroup. Use the values or defaultValues prop in react-hook-form to update checked prop to true or false.
https://stackblitz.com/edit/github-hxddty-gjzjx5?file=src%2FApp.tsx