[Form lib] Only call the field serializer when outputting the form data #74948
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Currently, the form lib calls the
serializer
function of a field each time its value changes. This was not intended by design and is a bug.The
serializer(s)
function should have the guarantee that when they are called, the field and form is valid. Which does not happen on each change. For example, a JSON field might have its string value as an invalid JSON. Itsserializer
would simply beJSON.parse
, that expects a valid JSON to be provided.If we need to format the field value on each change there is a
formatter
function that can be passed in the field config.The text was updated successfully, but these errors were encountered: