Closed Roanmh closed 7 months ago
This aligns the interface of the reset method returned by useRemixForm with the method from useForm
reset
useRemixForm
useForm
Expose the options that React Hook Form allows for the reset function to consumers of useRemixForms
useRemixForms
Fixes #73
If this is a new feature please add a description of what was added and why below:
Allows user to specify options to reset method.
New feature (non-breaking change which adds functionality).
I did not edit the docs as reset() is not mentioned in them. Perhaps it should be though.
reset()
Used in my project. Options are typed correctly, and I saw the expected change in behavior from keepErrors, keepValues, and keepDirty.
keepErrors
keepValues
keepDirty
Happy to elaborate more. I also skipped unit tests for now.
This aligns the interface of the
reset
method returned byuseRemixForm
with the method fromuseForm
Description
Expose the options that React Hook Form allows for the
reset
function to consumers ofuseRemixForms
Fixes #73
If this is a new feature please add a description of what was added and why below:
Allows user to specify options to reset method.
Type of change
New feature (non-breaking change which adds functionality).
I did not edit the docs as
reset()
is not mentioned in them. Perhaps it should be though.How Has This Been Tested?
Used in my project. Options are typed correctly, and I saw the expected change in behavior from
keepErrors
,keepValues
, andkeepDirty
.Happy to elaborate more. I also skipped unit tests for now.
Checklist: