You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To have a field-specific custom serialization transformer. To deprive the necessity to carry around Form.props.onSerialize for the fields that are meant to have the same serialization transformer.
Specification
A field may have a custom onSerialize property upon its creation in the options passed to createField high-order component.
There is no serialize option set by default.
Custom serialize has the highest priority, and is executed when serializing the fields.
Whenever a form-wide Form.props.onSerialize and a field-wide serialize are present, the form's transformer accepts already transformed field serialized value.
How
Add the serialize property to the createField options
Grab the serialize from the field record upon dispatching fieldUtils.serializeFields
Add unit test that custom serialize transformer gets propagated to the field record upon creation
Add integration test to assert custom serialize transformer is dispatched when a form is serialized
Add integration test to assert that custom serialize and Form.props.onSerialize complement each other
Update createField options documentation (+ example of usage)
The text was updated successfully, but these errors were encountered:
What
Support
serialize
property on the field record.Why
To have a field-specific custom serialization transformer. To deprive the necessity to carry around
Form.props.onSerialize
for the fields that are meant to have the same serialization transformer.Specification
onSerialize
property upon its creation in the options passed tocreateField
high-order component.serialize
option set by default.serialize
has the highest priority, and is executed when serializing the fields.Form.props.onSerialize
and a field-wideserialize
are present, the form's transformer accepts already transformed field serialized value.How
serialize
property to thecreateField
optionsserialize
from the field record upon dispatchingfieldUtils.serializeFields
serialize
transformer gets propagated to the field record upon creationserialize
transformer is dispatched when a form is serializedserialize
andForm.props.onSerialize
complement each othercreateField
options documentation (+ example of usage)The text was updated successfully, but these errors were encountered: