Skip to content

[Form lib] Only call the field serializer when outputting the form data #74948

@sebelga

Description

@sebelga

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. Its serializer would simply be JSON.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.

Metadata

Metadata

Assignees

Labels

Team:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//bugFixes for quality problems that affect the customer experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions