elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.99k stars 8.24k forks source link

[Mappings editor] Use `stripUnsetFields` option in edit field form #202150

Open ElenaStoeva opened 6 days ago

ElenaStoeva commented 6 days ago

In https://github.com/elastic/kibana/pull/152730, we disabled the "Update" button if there are no changes and added a warning that if we update the field, all default values would be added.

Image

This was a short-term solution to a problematic behavior where all default values are automatically added when clicking the "Update" button, even if they were not explicitly set.

Recently, we added a new stripUnsetFields option to the form library that allows only adding modified fields to the request (https://github.com/elastic/kibana/pull/194148) and we used it in the Advanced options tab in the Mappings editor. We can use this option for the edit form as well so that we don't have to disable the Update button and display a warning message.

elasticmachine commented 6 days ago

Pinging @elastic/kibana-management (Team:Kibana Management)