From 8d51588e6b0336cb6054d7148ad84d8ae287cc50 Mon Sep 17 00:00:00 2001 From: Syed Abdul Rahman <137684137+S-Abdul-Rahman@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:54:37 +0530 Subject: [PATCH] Fix search box component close icon (#7304) Co-authored-by: Kavin Venkatachalam --- frontend/src/_components/SearchBox.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/_components/SearchBox.jsx b/frontend/src/_components/SearchBox.jsx index 24a0f8ef77..45d0c0e36d 100644 --- a/frontend/src/_components/SearchBox.jsx +++ b/frontend/src/_components/SearchBox.jsx @@ -75,13 +75,13 @@ export const SearchBox = forwardRef( autoFocus={autoFocus} ref={ref} /> - {(isFocused || showClearButton) && ( + {searchText.length > 0 ? (
- )} + ) : ('')} );