no form reset on failure

This commit is contained in:
Julian Krauser 2025-04-30 11:36:48 +02:00
parent 751370fed4
commit eb622658d9

View file

@ -1,5 +1,5 @@
<template> <template>
<form class="flex flex-col w-full" @submit.prevent="submit"> <form ref="form" class="flex flex-col w-full" @submit.prevent="submit">
<div class="flex flex-row gap-2 items-center border-l-3 border-l-primary p-2 rounded-t-lg bg-red-200"> <div class="flex flex-row gap-2 items-center border-l-3 border-l-primary p-2 rounded-t-lg bg-red-200">
<p class="text-lg font-semibold grow">{{ title }}</p> <p class="text-lg font-semibold grow">{{ title }}</p>
<Spinner v-if="status == 'loading'" /> <Spinner v-if="status == 'loading'" />
@ -77,7 +77,7 @@ export default defineComponent({
}) })
.finally(() => { .finally(() => {
setTimeout(() => { setTimeout(() => {
this.enableEdit = false; if (this.status == "success") this.enableEdit = false;
this.status = undefined; this.status = undefined;
}, 2000); }, 2000);
}); });