logaretm / vee-validate

✅ Painless Vue forms
https://vee-validate.logaretm.com/v4
MIT License
10.79k stars 1.26k forks source link

Default value not working on multi-step form #4510

Open Tcharlyson opened 1 year ago

Tcharlyson commented 1 year ago

What happened?

When I set a default value via yup, the input field does not show my default value.

Reproduction steps

  1. You can see that on first step, fullName is correctly filled with John Walter default value
  2. Navigate on second step
  3. You can see that age input does not display 18 default value as expected

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

Relevant log output

No response

Demo link

https://stackblitz.com/edit/vee-validate-v4-multi-step-form-composition-rezog2

Code of Conduct

logaretm commented 11 months ago

Initial values are only assigned when the form is mounted the first time. They do no re-evaluate afterward. It could be something to work on for a new multi-form composable.