fix: disabled on field number

This commit is contained in:
Damien Roche 2024-12-17 09:01:32 +01:00
parent 3c990aa953
commit 86d265dee4
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ defineProps<FieldProps>()
</AutoFormLabel> </AutoFormLabel>
<FormControl> <FormControl>
<slot v-bind="slotProps"> <slot v-bind="slotProps">
<Input type="number" v-bind="{ ...slotProps.componentField, ...config?.inputProps }" :disabled="disabled" /> <Input type="number" v-bind="{ ...slotProps.componentField, ...config?.inputProps }" :disabled="config?.inputProps?.disabled ?? disabled" />
</slot> </slot>
</FormControl> </FormControl>
<FormDescription v-if="config?.description"> <FormDescription v-if="config?.description">

View File

@ -20,7 +20,7 @@ defineProps<FieldProps>()
</AutoFormLabel> </AutoFormLabel>
<FormControl> <FormControl>
<slot v-bind="slotProps"> <slot v-bind="slotProps">
<Input type="number" v-bind="{ ...slotProps.componentField, ...config?.inputProps }" :disabled="disabled" /> <Input type="number" v-bind="{ ...slotProps.componentField, ...config?.inputProps }" :disabled="config?.inputProps?.disabled ?? disabled" />
</slot> </slot>
</FormControl> </FormControl>
<FormDescription v-if="config?.description"> <FormDescription v-if="config?.description">