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.
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.
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.
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.