Skip to content
Snippets Groups Projects
Commit 1148c4f1 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: support deactivation of the AEditDialog save functionality

parent 7d808069
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@
type="submit"
class="btn tw-bg-aura-primary tw-text-white"
:form="id"
:disabled="isSaving"
:disabled="isSaving || canSave === false"
>
<Loading v-if="isSaving" class="tw-h-1.5 tw-mr-1" />
{{ saveLabel ?? t('save') }}
......@@ -33,11 +33,20 @@ import Loading from '@/components/generic/Loading.vue'
defineOptions({ compatConfig: { MODE: 3 } })
const props = defineProps<{
save?: () => Promise<unknown>
saveLabel?: string
cancelLabel?: string
}>()
const props = withDefaults(
defineProps<{
save?: () => unknown
canSave?: boolean | undefined
saveLabel?: string
cancelLabel?: string
}>(),
{
save: undefined,
canSave: undefined,
saveLabel: undefined,
cancelLabel: undefined,
},
)
const { t } = useI18n()
const id = useId('dialog-form')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment