primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.85k stars 1.24k forks source link

Form: reset not working, changed value not update input #6755

Open vksee opened 2 weeks ago

vksee commented 2 weeks ago

Describe the bug

PrimeVue Form reset not working. On call $form.reset() form states correctly (reseted). But not input value.

It also updates the states, but does not update the input: $form.username.value = 'NEW VALUE'

dependencies ``` "dependencies": { // ... "@primevue/forms": "^4.2.1", "@primevue/themes": "^4.2.1", "primevue": "^4.2.1", "vue": "^3.5.12", // ... } ```

Reproducer

https://stackblitz.com/edit/eszbvm?file=src%2FApp.vue

PrimeVue version

4.2.1

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

Chrome 130

Steps to reproduce the behavior

No response

Expected behavior

No response

damuso commented 1 week ago

I have probably found workaround using :value="$form.username.value" on a form input component. However I am not really sure if this is the right approach and if it does not bring more bugs

damuso commented 1 week ago

I created PR which may resolve this issue