Skip to content

Commit

Permalink
fix(Checkbox): label interaction without FormGroup (#1427)
Browse files Browse the repository at this point in the history
  • Loading branch information
romhml authored Feb 26, 2024
1 parent 4b6e80e commit 6e77f1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/components/forms/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import type { Strategy } from '../../types'
import appConfig from '#build/app.config'
import { checkbox } from '#ui/ui.config'
import colors from '#ui-colors'
import { useId } from '#app'
const config = mergeConfig<typeof checkbox>(appConfig.ui.strategy, appConfig.ui.checkbox, checkbox)
Expand Down Expand Up @@ -105,7 +106,8 @@ export default defineComponent({
setup (props, { emit }) {
const { ui, attrs } = useUI('checkbox', toRef(props, 'ui'), config, toRef(props, 'class'))
const { emitFormChange, color, name, inputId } = useFormGroup(props)
const { emitFormChange, color, name, inputId: _inputId } = useFormGroup(props)
const inputId = _inputId.value ?? useId()
const toggle = computed({
get () {
Expand Down

0 comments on commit 6e77f1d

Please sign in to comment.