Releases: environment-agency-austria/react-ocean-forms
Releases · environment-agency-austria/react-ocean-forms
2.2.2
2.2.1
2.2.0
New features
- Added
useFormContext
hook for easy access to the form context - Added
validators.withAsyncParam
wrapper function to call async validators with parameters - Added
disabled
andplaintext
props toField
to override global form state locally - Added
disabled
andplaintext
props toFieldGroup
to override global form state locally
Other
- Migrated to react 16.8 to enable hooks functionality
- Deprecated
withForm
-useFormContext
2.1.6
2.1.5
2.1.4
2.1.3
- Made production package size smaller
- Enabled tree shaking
- Fixed a bug where a valid result in
Form.onValidate
(for example result{ testField: undefined }
) would be treated as invalid - Fixed a bug where the
ValidationWrapper
would always ignoreasyncValidationWait
2.1.2
2.1.1
New features
- Added prop
resetOnSubmit
toForm
. When set to true, the form will trigger a form reset after a successful submit. Default setting: false - Added option for custom required validators. The form will now recognize a custom required validator if a synchronous validator is tagged with
isDefaultValidator = true
- Added prop
busy
toForm
. This allows to force the form into a busy state. Useful for example to disable the form buttons during data loading.
2.0.0
Breaking changes
Changed default usage of form fields
In order to provide the best typescript experience we had to ditch the conect of <Field component={Input}>
. From version 2.0.0 onwards the field component is used directly, e.g.: <Input name="demo" label="Demo Input" />
. The field component will still accept the field props. Developers who want to make their own field components now need to wrap those with the new withField
higher order component. A full migration guide will be available soon.
Other
- Fully migrated
react-ocean-forms
to typescript! - Removed deprecated
Form.onFieldValueChanged
callback - Fixed a bug where a form field would revert its value to '' if its current value evaulated to value == false.
- Added
isRequired
to field meta. It is true if the field / input component contains a required validator.