Skip to content

Releases: kettanaito/react-advanced-form

1.7.0

01 May 08:52
Compare
Choose a tag to compare
  • Updates the library's dev and save dependencies

Features

  • (Internal) Introduces various helper methods to shorten Form methods
  • (Internal) Introduces patched state update (#354) to make state operations faster and support concurrent state updates

Bugfixes

  • Fixes a bug that resulted into debounced onChange handlers to be invoked with the obsolete value (#341)
  • Fixes a bug that resulted into obsolete validity state on fields with reactive required prop (#344)
  • Fixes a bug that resulted some fields to unmount if they don't match the predicate of form.reset() (#347)
  • Fixes a bug that resulted into some optional empty fields blocking form submit (#350)
  • Fixes a bug that resulted into custom initialValue of a checkbox not being set (#380)

1.6.0

27 Nov 13:24
Compare
Choose a tag to compare
  • Decreases final bundle size by 50Kb by tree-shaking Ramda methods with babel-plugin-ramda

Features

  • Adds grouped fields selector in validation schema (#307, docs)
  • Adds touched property to the fieldState (#289)
  • Supports assertValue option on createField (docs)
  • Supports mapValue option on createField (docs)
  • Supports serialize option on createField (#303, docs)
  • Supports exact prop for Field.Group (#321, docs)

Bugfixes

  • Fixes a bug that resulted into name-specific missing message not being set on a field (#306)
  • Fixes a bug that retained the last state of field's errors after a field becomes valid (#301)
  • Fixes a bug that resulted into exception being thrown for delegated reactive props subscriptions (#304)
  • Fixes window is not defined exception during server-side rendering (#322)
  • Fixes a bug that didn't remove conditionally rendered fields from the form's state (#331)
  • Fixes a bug that removed fields that don't match a predicate in Form.clear() (#333)
  • Fixes a bug that propagated type: "text" to all fields by default (#335)

1.5.0

19 Sep 16:02
Compare
Choose a tag to compare

Migration

Package

  • Removes immutable peer dependency. React is the only peer dependency now.

API

  • Supports initialValues for a form (#271)
  • Supports transformation of serialized fields (#245)
  • Supports setting targeted error messages to fields using form reference (#209)
  • Field.props.rule now behaves as a reactive prop (#249)
  • Adds validated field prop into fieldState (#151)

Internals

  • Introduces huge architectural rewrite. Field update and validation are now functional compositions.
  • Prepared a thorough update of the Official documentation. Browse through new sections that cover the functionality in a more approachable way. Examples, examples everywhere!

1.4.0

20 Aug 08:22
Compare
Choose a tag to compare

API

  • Adds Form.clear() method for clearing the form's fields

Internals

  • Makes fieldUtils.resetField() a high order function that accepts a getNextValue function and returns an applicator function that expects a fieldProps. Changes utilized for both reset and clear functionality.

1.3.0

17 Apr 08:22
Compare
Choose a tag to compare

API

  • Introduces new Reactive props API. To reference and subscribe to another field's props use explicit get function exposed through the method arguments.

Internals

  • Removes the usage of Proxy, thus improving the browser support for IE.

1.2.0

11 Apr 09:55
Compare
Choose a tag to compare

API

  • Adds beforeRegister method to createField options. This method allows to apply additional transformations to the fieldProps immediately before the registration. It also allows to completely prevent the registration of the field in case false is returned. (#233)
  • Adds allowMultiple flag to createField options. This flag controls whether the multiple fields with the same name are allowed. (#233)
  • Allows to reference custom valuePropName props in validation rules resolvers functions. (#238)
  • Allows to control the field-wide initialValue in the createField options. (#240)

Bugfixes

  • References valuePropName in the fieldProps composition in createField.Field render method

Internals

  • Refines updateField method to use pure update function as a parameter (#182)

1.1.0

29 Mar 17:44
Compare
Choose a tag to compare

API

  • Adds support for nested field groups (#223)

Bugfixes

  • Fixes broken deep references using fieldProps (and additional sync rule resolver args, instead of fields). Changes the method call in flushFieldRefs, using dispatch to be aligned with form.context.withImmutable
  • Sets valid on expected Checkbox properly (#213)
  • Sets debounceValidate method on field record within Field.register() instead of Form.registerField() to prevent field record diversion (#221)

Internals

  • Decreases the bundle size by ~9 Kb
  • Uses regenerator-runtime instead of babel-polyfill
  • Adds support for environment-specific builds (#214)

1.0

20 Mar 20:17
Compare
Choose a tag to compare
1.0

Stable release that contains aligned API and the list of following features:

  • Creating custom fields / third-party fields integration
  • Form native callback methods
  • Reactive props
  • Field grouping
  • Multi-level validation logic
  • Validation messages with smart fallback algorithm