'Error when trying to reset Vuetify form inputs - Property 'reset' does not exist on type 'Element'
I want to reset a form after the user clicks cancel on a dialog. Checking the Vuetify documentation here, I found the$this.$ref.form.reset() function.
I added ref to the form as proposed in the documentation like so:
<v-form
ref="form"
v-model="valid"
lazy-validation
>
I added the $this.$ref.form.reset() to the function called when the cancel button is clicked on the dialog.
public cancelSetPasswordDialog(user) {
this.$refs.form.reset()
this.confirmPasswordFailMsg = ''
this.$emit('onCancel', user)
}
I am using TypeScript, to which I am pretty new, so that may be contributing to the issue. If anyone knows how to resolve this I'd appreciate the help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
