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
Need to introduce a new field lifecycle method which controls the registration behavior of the field. This method is different from mapPropsToField, which controls the field record which goes to the registration. The suggested method actually controls whether the registration is needed.
Why
Currently Form.registerField() contains a radio field specific logic, which looks and is a hack. Instead, a new lifecycle method must control that behavior, while registerField() ensures that lifecycle method is called and reacts to it correspondingly.
Also, this allows to control the registration of the fields for custom fields.
How
Introduce a new field lifecycle method.
Extend fieldPresets.radio, adding the logic which is currently in Form.registerField() (for radio fields de-duplication when the radio field with the same name and present value is set)
Ensure tests are passing.
The text was updated successfully, but these errors were encountered:
What
Need to introduce a new field lifecycle method which controls the registration behavior of the field. This method is different from
mapPropsToField
, which controls the field record which goes to the registration. The suggested method actually controls whether the registration is needed.Why
Currently
Form.registerField()
contains a radio field specific logic, which looks and is a hack. Instead, a new lifecycle method must control that behavior, whileregisterField()
ensures that lifecycle method is called and reacts to it correspondingly.Also, this allows to control the registration of the fields for custom fields.
How
fieldPresets.radio
, adding the logic which is currently inForm.registerField()
(for radio fields de-duplication when the radio field with the same name and present value is set)The text was updated successfully, but these errors were encountered: