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
[Security Solution][Exceptions] - Fix empty combo box entry option for exception item condition #151398
Conversation
@@ -32,7 +32,7 @@ const getExistingFields = (indexPattern: DataViewBase | undefined): DataViewFiel | |||
}; | |||
|
|||
const getSelectedFields = (selectedField: DataViewField | undefined): DataViewFieldBase[] => { | |||
return selectedField ? [selectedField] : []; | |||
return selectedField && selectedField.name.trim() !== '' ? [selectedField] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can't we use the paramContainsSpace
for checking the electedField && selectedField.name.trim() !== ''
so that we can unify the condition in different places ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @yctercero |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
…ion for exception item condition (#151398) (#151959) # Backport This will backport the following commits from `main` to `8.7`: - [[Security Solution][Exceptions] - Fix empty combo box entry option for exception item condition (#151398)](#151398) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Yara Tercero","email":"yctercero@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-02-23T02:10:38Z","message":"[Security Solution][Exceptions] - Fix empty combo box entry option for exception item condition (#151398)\n\n## Summary\r\n\r\nAddresses #145540 out the empty default entry item from combo box option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","auto-backport","Team:Security Solution Platform","backport:prev-minor","v8.7.0","v8.8.0"],"number":151398,"url":"#151398 Solution][Exceptions] - Fix empty combo box entry option for exception item condition (#151398)\n\n## Summary\r\n\r\nAddresses #145540 out the empty default entry item from combo box option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"#151398 Solution][Exceptions] - Fix empty combo box entry option for exception item condition (#151398)\n\n## Summary\r\n\r\nAddresses #145540 out the empty default entry item from combo box option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90"}}]}] BACKPORT--> Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
Summary
Addresses #145540
Filters out the empty default entry item from combo box option.
Checklist