Releases: react-hook-form/react-hook-form
Version 7.45.3
Version 7.45.2
Version 7.45.1
Version 7.45.0
🐞 close #10523 equal values prop not reset form values (#10525)
🪲 fix: useFormContext ReturnType (#10543)
⌨️ fix <Form />
onSubmit type overwrite (#10520)
👮♀️ enforce stricter type for controller on change callback (#10342)
🪲 fix: invalid test case for useController (#10493)
🎮 build: use up-to-date terser plugin (#10488)
💫 upgrade api-extractor version (#10487)
thanks to @kotarella1110, @Moshyfawn, @swallowtail62 and @bajormar
Version 7.45.0-next.1
🪲 fix: useFormContext ReturnType (#10543)
thanks to @swallowtail62
Version 7.45.0-next.0
🐞 close #10523 equal values prop not reset form values (#10525)
⌨️ fix <Form />
onSubmit type overwrite (#10520)
👮♀️ enforce stricter type for controller on change callback (#10342)
🪲 fix: invalid test case for useController (#10493)
🎮 build: use up-to-date terser plugin (#10488)
💫 upgrade api-extractor version (#10487)
thanks to @kotarella1110, @Moshyfawn and @bajormar
Version 7.44.3
🦉 fix: add named component export (#10486)
💭 fix React import inconsistency (#10479)
🏙️ fix: removed code from the README updater which was trying to read a non-existent docs/Helpers.yaml
📝 fix doc: update urls from /api to /docs (#10468)
thanks to @Moshyfawn @@protofarer @farfromrest
Version 7.44.2
Version 7.44.1
🐞 fix <Form />
component content-type json type missing (#10454)
Version 7.44.0
📄 New <Form />
Component (#9735)
https://react-hook-form.com/docs/useform/form
- add try and catch for JSON.stringify
// Send post request with formData
<Form
action="/api"
control={control}
onSuccess={() => {
alert("Great");
}}
/>
// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}>
{errors.root?.server.type === 500 && 'Error message'}
{errors.root?.server.type === 400 && 'Error message'}
</Form>
// Send post request with formData with fetch
<Form
onSubmit={async ({ formData, data, formDataJson, event }) => {
await fetch("api", {
method: "post",
body: formData,
});
}}
/>
🗝️ support TransformedValues with useFormContext (#10322)
useFormContext<FormValue, TransformedValues>()
🚔 added TTransformedValues to FormProvider (#10368)
FormProviderProps<TFieldValues, TContext, TTransformedValues>
🐞 fix #10139 with errors diff from the previous with field array action (#10216)
🐞 related #10238 return default values in watch and useWatch when reset is called with an empty object
🦮 remove unnecessary as unknown as cast (#10300)
🧛♂️ close #10277 remove pattern empty string check (#10279)
🐞 fix #9037 bugs that occur in the presence of Array polyfills (#10328)
🫥 close #10348 stop shouldUseNativeValidation pass down constraint props (#10350)
😵💫 close #10386 re-register controller input to fix strict mode (#10418)
✍️ update form.tsx for TSdoc (#10399)
thanks to @yasamoka & @Torvin @ryota-murakami & @devakrishna33