mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution] Fix filtering on searching for lists (#147096)
## Summary - Addresses https://github.com/elastic/kibana/issues/145677 - Use the filter of the list type every time we call the fetch list. - On search we need to append the ` types: [ExceptionListTypeEnum.DETECTION, ExceptionListTypeEnum.ENDPOINT],` to the users' filters, to filter out the other list type that should not be displayed on `Rule Exceptions` page
This commit is contained in:
parent
132f6a557f
commit
727df5e36b
1 changed files with 5 additions and 4 deletions
|
@ -94,9 +94,7 @@ export const SharedLists = React.memo(() => {
|
|||
const [referenceModalState, setReferenceModalState] = useState<ReferenceModalState>(
|
||||
exceptionReferenceModalInitialState
|
||||
);
|
||||
const [filters, setFilters] = useState<ExceptionListFilter | undefined>({
|
||||
types: [ExceptionListTypeEnum.DETECTION, ExceptionListTypeEnum.ENDPOINT],
|
||||
});
|
||||
const [filters, setFilters] = useState<ExceptionListFilter | undefined>();
|
||||
|
||||
const [
|
||||
loadingExceptions,
|
||||
|
@ -108,7 +106,10 @@ export const SharedLists = React.memo(() => {
|
|||
setSort,
|
||||
] = useExceptionLists({
|
||||
errorMessage: i18n.ERROR_EXCEPTION_LISTS,
|
||||
filterOptions: filters,
|
||||
filterOptions: {
|
||||
...filters,
|
||||
types: [ExceptionListTypeEnum.DETECTION, ExceptionListTypeEnum.ENDPOINT],
|
||||
},
|
||||
http,
|
||||
namespaceTypes: ['single', 'agnostic'],
|
||||
notifications,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue