Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useResetForm should take an optional second parameter of ResetFormOpts #4707

Closed
jackpercy-acl opened this issue Mar 21, 2024 · 0 comments
Closed
Labels
✨ enhancement a "nice to have" feature

Comments

@jackpercy-acl
Copy link

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.

@logaretm logaretm added the ✨ enhancement a "nice to have" feature label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement a "nice to have" feature
Projects
None yet
Development

No branches or pull requests

2 participants