diff --git a/src/runtime/components/forms/Checkbox.vue b/src/runtime/components/forms/Checkbox.vue index 0e38e3a972..511c6d4a59 100644 --- a/src/runtime/components/forms/Checkbox.vue +++ b/src/runtime/components/forms/Checkbox.vue @@ -36,7 +36,6 @@ import { twMerge, twJoin } from 'tailwind-merge' import { useUI } from '../../composables/useUI' import { useFormGroup } from '../../composables/useFormGroup' import { mergeConfig } from '../../utils' -import { uid } from '../../utils/uid' import type { Strategy } from '../../types' // @ts-expect-error import appConfig from '#build/app.config' @@ -50,8 +49,7 @@ export default defineComponent({ props: { id: { type: String, - // A default value is needed here to bind the label - default: () => uid() + default: () => null }, value: { type: [String, Number, Boolean, Object], diff --git a/src/runtime/components/forms/FormGroup.vue b/src/runtime/components/forms/FormGroup.vue index 727d5c54ff..4a93e117c9 100644 --- a/src/runtime/components/forms/FormGroup.vue +++ b/src/runtime/components/forms/FormGroup.vue @@ -46,7 +46,6 @@ import type { FormError, InjectedFormGroupValue, Strategy } from '../../types' // @ts-expect-error import appConfig from '#build/app.config' import { formGroup } from '#ui/ui.config' -import { uid } from '../../utils/uid' const config = mergeConfig(appConfig.ui.strategy, appConfig.ui.formGroup, formGroup) @@ -109,7 +108,7 @@ export default defineComponent({ }) const size = computed(() => ui.value.size[props.size ?? config.default.size]) - const inputId = ref(uid()) + const inputId = ref() provide('form-group', { error, diff --git a/src/runtime/components/forms/Radio.vue b/src/runtime/components/forms/Radio.vue index 4f9ab81714..68e3180663 100644 --- a/src/runtime/components/forms/Radio.vue +++ b/src/runtime/components/forms/Radio.vue @@ -2,7 +2,7 @@
-