vee-validate icon indicating copy to clipboard operation
vee-validate copied to clipboard

useResetForm should take an optional second parameter of ResetFormOpts

Open jackpercy-acl opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently using the useResetForm() composable does not allow you to pass the force: true option, this means you cannot overwrite all fields.

Describe the solution you'd like

The function returned by the useResetForm() composable should allow a second optional parameter to be provided as opts?: Partial<ResetFormOpts>, the same as the resetForm function returned by useForm().

Describe alternatives you've considered

As a workaround, I am able to use the form directly or inject the form with const form = inject(FormContextKey), then use form.resetForm() which allows the reset options to be passed as a second parameter.

jackpercy-acl avatar Mar 21 '24 11:03 jackpercy-acl