We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following the docs: https://chakra-ui.com/docs/hooks/use-checkbox-group
State gets changed for the "Flex" element but not when clicking on the Button element.
function CustomCheckbox(props) { const { state, getCheckboxProps, getInputProps, getLabelProps, htmlProps } = useCheckbox(props); console.log(111, state.isChecked) return ( <chakra.label display='flex' flexDirection='row' {...htmlProps}> <input {...getInputProps()} hidden /> <Flex alignItems='center' justifyContent='center' border='2px solid' borderColor='green.500' w={4} h={4} {...getCheckboxProps()} > {state.isChecked && <Box w={2} h={2} bg='green.500' />} </Flex> <Button variant={state.isChecked ? 'solid' : 'outline'} {...getCheckboxProps()} > Morning </Button> </chakra.label> ); }
Chakra UI React: version: '2.8.2'
https://codesandbox.io/p/sandbox/bold-swanson-vcdw43
2.8.2
Firefox 125.0
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Following the docs: https://chakra-ui.com/docs/hooks/use-checkbox-group
State gets changed for the "Flex" element but not when clicking on the Button element.
Chakra UI React: version: '2.8.2'
Link to Reproduction
https://codesandbox.io/p/sandbox/bold-swanson-vcdw43
Steps to reproduce
Chakra UI Version
2.8.2
Browser
Firefox 125.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: