-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Advanced settings] JSON field changes happen twice #177600
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
yuliacech
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
Feb 22, 2024
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
ElenaStoeva
added a commit
that referenced
this issue
Mar 5, 2024
Fixes #177600 ## Summary This PR fixes the incorrect behaviour described in #177600, which seems to be caused because the `onChange` handler of the code editor component is redundantly called with the current value when the "Reset to default" link or the "Save" button is clicked. This fix adds a check for whether the value passed to the `onChange` is different from the current value and only then it would update the field.
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this issue
Mar 5, 2024
Fixes elastic#177600 ## Summary This PR fixes the incorrect behaviour described in elastic#177600, which seems to be caused because the `onChange` handler of the code editor component is redundantly called with the current value when the "Reset to default" link or the "Save" button is clicked. This fix adds a check for whether the value passed to the `onChange` is different from the current value and only then it would update the field. (cherry picked from commit f4bb26d)
kibanamachine
added a commit
that referenced
this issue
Mar 5, 2024
# 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]>
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
Found when testing #175874 on BC1 for 8.13
When the field observability:apmAWSLambdaPriceFactor is changed, it seems like the JSON field emits changes event twice.
To reproduce:
Recording
Screen.Recording.2024-02-22.at.15.43.03.mov
The text was updated successfully, but these errors were encountered: