Releases: react-hook-form/react-hook-form
Releases 路 react-hook-form/react-hook-form
Version 3.8.0
- new method:
getValues()
This method will return what's current values in the form.
Version 3.7.5
fix bug #36
setError
bug with re-render with error- Remove event listener check DOM type to avoid
.contains NODE
issue
Version 3.7.3
- fix a bug on #34 for custom input validation
Version 3.7.1
- better support on an external component and server-side rendering
the example below for integrating with react-select
https://codesandbox.io/s/72j69vnk1x
Version 3.7.0
- new API for set field value
setValue
const setValue = (name: string, value: string | number | boolean) => void
example:
setValue('firstname', 'bill');
Version 3.6.0
- support
defaultValues
as optional argument foruseForm
const { register, handleSubmit } = useForm({
defaultValues: {
firstName: "bill",
lastName: "luo",
email: "bluebill1049@hotmail.com"
}
});
Version 3.5.2
- skip re-render after successful submit
Version 3.5.0
- fix the issue around remove event listener on reset and remove an element from the DOM tree
Version 3.4.2
- Fix a bug with reset should remove event listeners as well
Version 3.4.0
- added
setError
method for a dynamic set or clear error
set an error
set('firstname', 'required')
clear an error
set('firstname', undefined)