mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Security solution][endpoint] Fix Endpoint List KQL bar not updating the list when the filter is removed (#112595)
* Fix search bar `onQuerySubmit` to drop prior `admin_query` param when pushing a new route change * enhance current test case to ensure existing data is also changed when its blank
This commit is contained in:
parent
9bd61a21fe
commit
2e56351096
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ describe('when rendering the endpoint list `AdminSearchBar`', () => {
|
|||
])(
|
||||
'should update the url and exclude the `admin_query` param when %s was entered',
|
||||
async (_, value) => {
|
||||
await render();
|
||||
await render({ admin_query: "(language:kuery,query:'foo')" });
|
||||
await submitQuery(value);
|
||||
|
||||
expect(getQueryParamsFromStore().admin_query).toBe(undefined);
|
||||
|
|
|
@ -24,7 +24,7 @@ const AdminQueryBar = styled.div`
|
|||
|
||||
export const AdminSearchBar = memo(() => {
|
||||
const history = useHistory();
|
||||
const queryParams = useEndpointSelector(selectors.uiQueryParams);
|
||||
const { admin_query: _, ...queryParams } = useEndpointSelector(selectors.uiQueryParams);
|
||||
const searchBarIndexPatterns = useEndpointSelector(selectors.patterns);
|
||||
const searchBarQuery = useEndpointSelector(selectors.searchBarQuery);
|
||||
const clonedIndexPatterns = useMemo(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue