Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.13`: - [[Advanced Settings] Fix code editor field (#177772)](#177772) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-03-05T12:02:40Z","message":"[Advanced Settings] Fix code editor field (#177772)\n\nFixes https://github.com/elastic/kibana/issues/177600\r\n\r\n## Summary\r\n\r\nThis PR fixes the incorrect behaviour described in\r\nhttps://github.com//issues/177600, which seems to be\r\ncaused because the `onChange` handler of the code editor component is\r\nredundantly called with the current value when the \"Reset to default\"\r\nlink or the \"Save\" button is clicked. This fix adds a check for whether\r\nthe value passed to the `onChange` is different from the current value\r\nand only then it would update the field.","sha":"f4bb26d0efc7e6e375b8d67fad6d3a0da00bd584","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Kibana Management","Team:Deployment Management","release_note:skip","backport:prev-minor","v8.14.0"],"title":"[Advanced Settings] Fix code editor field","number":177772,"url":"https://github.com/elastic/kibana/pull/177772","mergeCommit":{"message":"[Advanced Settings] Fix code editor field (#177772)\n\nFixes https://github.com/elastic/kibana/issues/177600\r\n\r\n## Summary\r\n\r\nThis PR fixes the incorrect behaviour described in\r\nhttps://github.com//issues/177600, which seems to be\r\ncaused because the `onChange` handler of the code editor component is\r\nredundantly called with the current value when the \"Reset to default\"\r\nlink or the \"Save\" button is clicked. This fix adds a check for whether\r\nthe value passed to the `onChange` is different from the current value\r\nand only then it would update the field.","sha":"f4bb26d0efc7e6e375b8d67fad6d3a0da00bd584"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177772","number":177772,"mergeCommit":{"message":"[Advanced Settings] Fix code editor field (#177772)\n\nFixes https://github.com/elastic/kibana/issues/177600\r\n\r\n## Summary\r\n\r\nThis PR fixes the incorrect behaviour described in\r\nhttps://github.com//issues/177600, which seems to be\r\ncaused because the `onChange` handler of the code editor component is\r\nredundantly called with the current value when the \"Reset to default\"\r\nlink or the \"Save\" button is clicked. This fix adds a check for whether\r\nthe value passed to the `onChange` is different from the current value\r\nand only then it would update the field.","sha":"f4bb26d0efc7e6e375b8d67fad6d3a0da00bd584"}}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
- Loading branch information