Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sebelga opened this issue Aug 13, 2020 · 1 comment · Fixed by #75166
Closed

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

sebelga opened this issue Aug 13, 2020 · 1 comment · Fixed by #75166
Assignees
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

Comments

@sebelga
Copy link
Contributor

sebelga commented Aug 13, 2020

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.

@sebelga sebelga added 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 labels Aug 13, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants