From 46310ee03f65a10eb73584c7ffeec8daca05d189 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Lopez Date: Mon, 17 Apr 2023 13:07:06 -0500 Subject: [PATCH] fix(search): Stop clear enter propagation Signed-off-by: Carlos Esteban Lopez --- .../src/components/SearchBar/SearchBar.tsx | 12 +++++++++++- .../src/components/SearchModal/SearchModal.tsx | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/plugins/search-react/src/components/SearchBar/SearchBar.tsx b/plugins/search-react/src/components/SearchBar/SearchBar.tsx index f4d89cb23f..8fad4ef9a6 100644 --- a/plugins/search-react/src/components/SearchBar/SearchBar.tsx +++ b/plugins/search-react/src/components/SearchBar/SearchBar.tsx @@ -133,7 +133,17 @@ export const SearchBarBase: ForwardRefExoticComponent = const endAdornment = ( - diff --git a/plugins/search/src/components/SearchModal/SearchModal.tsx b/plugins/search/src/components/SearchModal/SearchModal.tsx index 74e0111b3b..51dafda517 100644 --- a/plugins/search/src/components/SearchModal/SearchModal.tsx +++ b/plugins/search/src/components/SearchModal/SearchModal.tsx @@ -103,7 +103,7 @@ const useStyles = makeStyles(theme => ({ viewResultsLink: { verticalAlign: '0.5em' }, })); -export const Modal = () => { +export const Modal = ({ toggleModal }: SearchModalChildrenProps) => { const classes = useStyles(); const navigate = useNavigate(); const { transitions } = useTheme(); @@ -204,7 +204,9 @@ export const SearchModal = (props: SearchModalProps) => { > {open && ( - {(children && children({ toggleModal })) ?? } + {(children && children({ toggleModal })) ?? ( + + )} )}