From 8dd22603d000b536a3228111c4efda508dcc1b78 Mon Sep 17 00:00:00 2001 From: PhilippeOberti Date: Wed, 10 Jul 2024 09:23:15 +0200 Subject: [PATCH 1/2] [Security Solution][Notes] - fix notes management page search crash --- .../public/notes/components/search_row.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/security_solution/public/notes/components/search_row.tsx b/x-pack/plugins/security_solution/public/notes/components/search_row.tsx index 1e88a47b2e2d2..672e8b7bcb5de 100644 --- a/x-pack/plugins/security_solution/public/notes/components/search_row.tsx +++ b/x-pack/plugins/security_solution/public/notes/components/search_row.tsx @@ -7,9 +7,9 @@ import { EuiFlexGroup, EuiFlexItem, EuiSearchBar } from '@elastic/eui'; import React, { useMemo, useCallback } from 'react'; -import { useDispatch, useSelector } from 'react-redux'; +import { useDispatch } from 'react-redux'; import styled from 'styled-components'; -import { userSearchedNotes, selectNotesTableSearch } from '..'; +import { userSearchedNotes } from '..'; const SearchRowContainer = styled.div` &:not(:last-child) { @@ -36,8 +36,6 @@ export const SearchRow = React.memo(() => { [] ); - const notesSearch = useSelector(selectNotesTableSearch); - const onQueryChange = useCallback( ({ queryText }) => { dispatch(userSearchedNotes(queryText.trim())); @@ -49,12 +47,7 @@ export const SearchRow = React.memo(() => { - + From 300dee765285ddd58fe62da3c0383b79f9a1aaa8 Mon Sep 17 00:00:00 2001 From: PhilippeOberti Date: Wed, 10 Jul 2024 14:24:03 +0200 Subject: [PATCH 2/2] PR comments --- .../security_solution/public/notes/components/search_row.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/notes/components/search_row.tsx b/x-pack/plugins/security_solution/public/notes/components/search_row.tsx index 672e8b7bcb5de..f2e86d324a54a 100644 --- a/x-pack/plugins/security_solution/public/notes/components/search_row.tsx +++ b/x-pack/plugins/security_solution/public/notes/components/search_row.tsx @@ -47,7 +47,7 @@ export const SearchRow = React.memo(() => { - +