Skip to content

Releases: environment-agency-austria/react-ocean-forms

2.2.2

17 Jun 15:25
f475684
Compare
Choose a tag to compare

added reset function to form context

2.2.1

31 Jan 08:18
Compare
Choose a tag to compare
  • Bugfix: stop event propagation of submit and reset form events

2.2.0

19 Feb 22:32
Compare
Choose a tag to compare

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 and plaintext props to Field to override global form state locally
  • Added disabled and plaintext props to FieldGroup to override global form state locally

Other

  • Migrated to react 16.8 to enable hooks functionality
  • Deprecated withForm - useFormContext

2.1.6

19 Dec 11:58
4bbdb85
Compare
Choose a tag to compare
  • Bugfix: Added null as allowed return type for Form.onValidate callback

2.1.5

16 Dec 21:47
Compare
Choose a tag to compare
  • Re-relase due to npm publish issue

2.1.4

16 Dec 21:36
57bb607
Compare
Choose a tag to compare
  • Migrated to rollup to improve package size and tree shaking
  • Fixed typing issue with validators in typescript 3.2+

2.1.3

01 Dec 13:02
9192e3d
Compare
Choose a tag to compare
  • 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 ignore asyncValidationWait

2.1.2

30 Nov 16:02
Compare
Choose a tag to compare

Hotfix

  • Version 2.1.1 was deployed without any type definitions

2.1.1

30 Nov 13:19
Compare
Choose a tag to compare

New features

  • Added prop resetOnSubmit to Form. 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 to Form. This allows to force the form into a busy state. Useful for example to disable the form buttons during data loading.

2.0.0

19 Nov 18:08
6392d9d
Compare
Choose a tag to compare

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.