Releases: kettanaito/react-advanced-form
Releases · kettanaito/react-advanced-form
1.7.0
- 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
- 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 thefieldState
(#289) - Supports
assertValue
option oncreateField
(docs) - Supports
mapValue
option oncreateField
(docs) - Supports
serialize
option oncreateField
(#303, docs) - Supports
exact
prop forField.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
Migration
- Please see the guidelines on migrating from 1.4.x to 1.5.x
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 intofieldState
(#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
API
- Adds
Form.clear()
method for clearing the form's fields
Internals
- Makes
fieldUtils.resetField()
a high order function that accepts agetNextValue
function and returns an applicator function that expects afieldProps
. Changes utilized for bothreset
andclear
functionality.
1.3.0
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
API
- Adds
beforeRegister
method tocreateField
options. This method allows to apply additional transformations to thefieldProps
immediately before the registration. It also allows to completely prevent the registration of the field in casefalse
is returned. (#233) - Adds
allowMultiple
flag tocreateField
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 thecreateField
options. (#240)
Bugfixes
- References
valuePropName
in thefieldProps
composition increateField.Field
render method
Internals
- Refines
updateField
method to use pureupdate
function as a parameter (#182)
1.1.0
API
- Adds support for nested field groups (#223)
Bugfixes
- Fixes broken deep references using
fieldProps
(and additional sync rule resolver args, instead offields
). Changes the method call influshFieldRefs
, usingdispatch
to be aligned withform.context.withImmutable
- Sets
valid
on expected Checkbox properly (#213) - Sets
debounceValidate
method on field record withinField.register()
instead ofForm.registerField()
to prevent field record diversion (#221)
Internals
- Decreases the bundle size by ~9 Kb
- Uses
regenerator-runtime
instead ofbabel-polyfill
- Adds support for environment-specific builds (#214)
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