feat(frontend): add loading prop to FormField component
When loading is true, adds 'is-loading' class to the input element.
This commit is contained in:
parent
1ea8a3cdba
commit
bb16500cb5
|
|
@ -7,6 +7,7 @@ interface Props {
|
|||
error?: string | null
|
||||
id?: string
|
||||
disabled?: boolean
|
||||
loading?: boolean
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
|
@ -36,7 +37,10 @@ const controlClasses = computed(() => [
|
|||
|
||||
const inputClasses = computed(() => [
|
||||
'input',
|
||||
{'disabled': props.disabled},
|
||||
{
|
||||
'disabled': props.disabled,
|
||||
'is-loading': props.loading,
|
||||
},
|
||||
])
|
||||
|
||||
// Only bind value when modelValue is explicitly provided (not undefined)
|
||||
|
|
|
|||
Loading…
Reference in New Issue