Replies: 2 comments 7 replies
-
This should be the default unless you've set |
Beta Was this translation helpful? Give feedback.
7 replies
-
I hope this helps this will reset the form. If you want it to reset the form on close, add the reset function to your I also added some helpful links 👍 Hint 1:const form = useTemplateRef<HTMLFormElement>("your-form"); Example:<script setup lang="ts">
import { useTemplateRef, ref } from "vue";
const form = useTemplateRef<HTMLFormElement>("my-form");
const field = ref("");
const reset = () => {
form.value.reset();
};
</script>
<template>
<v-form ref="my-form">
<v-text-field label="Alrigt" v-model="field"></v-text-field>
<v-checkbox label="Check"></v-checkbox>
</v-form>
<v-btn @click="reset">Reset</v-btn>
</template>
Playground: Example |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a form and some custom component in dialog. so i need to reset all contents.
Beta Was this translation helpful? Give feedback.
All reactions