fix(ButtonGroup/FormGroup): pass default sizes to children (#1875)

This commit is contained in:
Romain Hamel
2024-06-19 12:08:13 +02:00
committed by GitHub
parent 4ad904f83d
commit 6b6b03d59f
6 changed files with 17 additions and 6 deletions

View File

@@ -171,7 +171,7 @@ export default defineComponent({
const { emitFormBlur, emitFormInput, size: sizeFormGroup, color, inputId, name } = useFormGroup(props, config)
const size = computed(() => sizeButtonGroup.value || sizeFormGroup.value)
const size = computed(() => sizeButtonGroup.value ?? sizeFormGroup.value)
const modelModifiers = ref(defu({}, props.modelModifiers, { trim: false, lazy: false, number: false }))

View File

@@ -290,7 +290,7 @@ export default defineComponent({
const { size: sizeButtonGroup, rounded } = useInjectButtonGroup({ ui, props })
const { emitFormBlur, emitFormChange, inputId, color, size: sizeFormGroup, name } = useFormGroup(props, config)
const size = computed(() => sizeButtonGroup.value || sizeFormGroup.value)
const size = computed(() => sizeButtonGroup.value ?? sizeFormGroup.value)
const internalQuery = ref('')
const query = computed({

View File

@@ -187,7 +187,7 @@ export default defineComponent({
const { emitFormChange, inputId, color, size: sizeFormGroup, name } = useFormGroup(props, config)
const size = computed(() => sizeButtonGroup.value || sizeFormGroup.value)
const size = computed(() => sizeButtonGroup.value ?? sizeFormGroup.value)
const onInput = (event: Event) => {
emit('update:modelValue', (event.target as HTMLInputElement).value)

View File

@@ -346,7 +346,7 @@ export default defineComponent({
const { size: sizeButtonGroup, rounded } = useInjectButtonGroup({ ui, props })
const { emitFormBlur, emitFormChange, inputId, color, size: sizeFormGroup, name } = useFormGroup(props, config)
const size = computed(() => sizeButtonGroup.value || sizeFormGroup.value)
const size = computed(() => sizeButtonGroup.value ?? sizeFormGroup.value)
const internalQuery = ref('')
const query = computed({