form reset on create

This commit is contained in:
Julian Krauser 2024-10-29 15:40:30 +01:00
parent d7596c3f2d
commit ea7f6e5ec2

View file

@ -4,7 +4,7 @@
<p class="text-xl font-medium">Protokoll erstellen</p>
</div>
<br />
<form class="flex flex-col gap-4 py-2" @submit.prevent="triggerCreate">
<form ref="form" class="flex flex-col gap-4 py-2" @submit.prevent="triggerCreate">
<div>
<label for="title">Titel</label>
<input type="text" id="title" required autocomplete="false" />
@ -68,6 +68,7 @@ export default defineComponent({
.then(() => {
this.status = { status: "success" };
this.timeout = setTimeout(() => {
(this.$refs.form as HTMLFormElement).reset();
this.closeModal();
}, 1500);
})