From 704f449a96719f14a74f5472fa859f9f6c5d0e93 Mon Sep 17 00:00:00 2001 From: franco sanchez Date: Fri, 29 Sep 2023 12:19:34 -0300 Subject: [PATCH] chore: testing a change with the input click with the useOutsideClick --- src/components/forms/filters/InputSearch.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/forms/filters/InputSearch.tsx b/src/components/forms/filters/InputSearch.tsx index c0f0e9a..1c983e3 100644 --- a/src/components/forms/filters/InputSearch.tsx +++ b/src/components/forms/filters/InputSearch.tsx @@ -43,7 +43,8 @@ export function InputSearch({ top, onResultClick, }: BookSearchResultsType) { - const containerRef = useRef(null); + // const containerRef = useRef(null); + const containerRef = useRef(null); const colorIcons = useColorModeValue('gray.700', 'gray.300'); const bgInput = useColorModeValue('white', 'black'); const colorInput = useColorModeValue('gray.900', 'gray.100'); @@ -70,11 +71,11 @@ export function InputSearch({ useOutsideClick({ ref: containerRef, - handler: () => { - if (search.query) { - setSearch({ ...search, query: '' }); - } - }, + // handler: () => { + // if (search.query) { + // setSearch({ ...search, query: '' }); + // } + // }, }); useEffect(() => { @@ -129,7 +130,7 @@ export function InputSearch({ return ( <> - + @@ -184,7 +185,6 @@ export function InputSearch({ p='4' bg={colorContainerBg} color={colorContainer} - ref={containerRef} fontWeight='500' position={{ base: 'inherit', md: 'absolute' }} top={top}