You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type something in the input boxes. Hit the reset links. It will change the value in the form state data displayed above the inputs, but the actual input values won't change.
Expected behavior
This should be resetting the actual form input values.
The text was updated successfully, but these errors were encountered:
I have the same issue. I use a workaround to make it works, hoping 4.3.1 will solve it.
On the Form component, I use a key, and when I want to reset the form, I update the key. It will force Vue to re-render the form with initial values.
import{ref}from"vue";constformId=ref<string>(String(newDate().getTime()));constonSave=(event: FormSubmitEvent)=>{if(event.valid){// your logic hereformId.value=String(newDate().getTime());}};
Describe the bug
The ability to reset a form appears to be broken. It doesn't actually change the values back. I've tried directly referring to "$form.reset()" and using "form.reset()" with a "ref='form'" Please refer to this discussion:
https://stackoverflow.com/questions/79413343/primevue-how-to-use-reset-emit-to-clear-form/79413351
Example here:
https://stackblitz.com/edit/u9znrf-ivrsnctn
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/u9znrf-ivrsnctn
Environment
Uses Primevue and Privevue Forms v4.2.5.
Vue version
^3.2.45
PrimeVue version
4.2.5
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Please visit the example:
https://stackblitz.com/edit/u9znrf-ivrsnctn
Type something in the input boxes. Hit the reset links. It will change the value in the form state data displayed above the inputs, but the actual input values won't change.
Expected behavior
This should be resetting the actual form input values.
The text was updated successfully, but these errors were encountered: