mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Solution][Event Filters] Fix autocomplete infinite loop bug when deleting the field combobox in event filters form (#189980)
## Summary - [x] Fixes a bug where the user would not be able to clear out the Field combo box in the Event Filters form - [x] Adds a clear out button to the field combo box Testing steps: - Navigate to Security > Manage > Event Filters > Add event filter - Fill out the Field and Value section and select out of the builder - Try to clear out field either by backspacing the selection or with the `x` button - Successfully clear out the field # Screenshots  --------- Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co> Co-authored-by: Ashokaditya <ashokaditya@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
e4eb55b9cb
commit
d85069292c
2 changed files with 5 additions and 2 deletions
|
@ -220,7 +220,7 @@ export const BuilderEntryItem: React.FC<EntryItemProps> = ({
|
|||
exceptionItemIndex,
|
||||
entry.entryIndex
|
||||
)}
|
||||
isClearable={false}
|
||||
isClearable={true}
|
||||
isLoading={false}
|
||||
isDisabled={isDisabled || indexPattern == null}
|
||||
onChange={handleFieldChange}
|
||||
|
|
|
@ -575,7 +575,10 @@ export const EventFiltersForm: React.FC<ArtifactFormComponentProps & { allowSele
|
|||
tags: exception?.tags ?? [],
|
||||
meta: exception.meta,
|
||||
}
|
||||
: exception;
|
||||
: {
|
||||
...exception,
|
||||
entries: [{ field: '', operator: 'included', type: 'match', value: '' }],
|
||||
};
|
||||
const hasValidConditions =
|
||||
arg.exceptionItems[0] !== undefined
|
||||
? !(arg.errorExists && !arg.exceptionItems[0]?.entries?.length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue