vue-file-agent
vue-file-agent copied to clipboard
How to Reset / ReInitialize the Component after form is submitted.
Hello, Vue File Agent package is great for dealing with file handling in vue js applications.
I came across this problem of restting form fields after form is submitted. But for Vue File Agent there was no option i found in documentation to Reset / Reinitialize the component. I have attached a demo Form for reference.
Problem
- After filling out form, all other fields gets reset. except Vue File Agent. Files still seen.
Form filled
My Expectations :
- We might have an method like reset which can be called using ref from parent.
this.$refs.fileAgent.reset()
just set your v-model to null or []
this.form.files = []