mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-22 16:00:39 +01:00
feat(Form): Select and InputMenu integration (#97)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -55,13 +55,6 @@ const ui = computed(() => tv({ extend: switchTv, slots: props.ui })({
|
||||
loading: props.loading,
|
||||
disabled: disabled.value || props.loading
|
||||
}))
|
||||
|
||||
// FIXME: I think there's a race condition between this and the v-model event.
|
||||
// This must be triggered after the value updates, otherwise the form validates
|
||||
// the previous value.
|
||||
async function onChecked() {
|
||||
emitFormChange()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -75,7 +68,7 @@ async function onChecked() {
|
||||
:name="name"
|
||||
:disabled="disabled || loading"
|
||||
:class="ui.base()"
|
||||
@update:checked="onChecked"
|
||||
@update:checked="emitFormChange()"
|
||||
>
|
||||
<SwitchThumb :class="ui.thumb()">
|
||||
<UIcon v-if="loading" :name="loadingIcon || appConfig.ui.icons.loading" :class="ui.icon({ checked: true, unchecked: true })" />
|
||||
|
||||
Reference in New Issue
Block a user