diff --git a/frontend/packages/common/src/ui/components/inputs/SearchBar/SearchBar.tsx b/frontend/packages/common/src/ui/components/inputs/SearchBar/SearchBar.tsx index 338bbe46..dbcead97 100644 --- a/frontend/packages/common/src/ui/components/inputs/SearchBar/SearchBar.tsx +++ b/frontend/packages/common/src/ui/components/inputs/SearchBar/SearchBar.tsx @@ -48,19 +48,6 @@ export const SearchBar: FC = ({ const isClearable = !(isLoading || loading) && buffer.length > 0; - const clearInputButton = ( - { - setBuffer(''); - debouncedOnChange(''); - setLoading(true); - }} - icon={} - label={t('label.clear-search')} - /> - ); - return ( <> = ({ ), endAdornment: isClearable ? ( - {clearInputButton} + { + setBuffer(''); + debouncedOnChange(''); + setLoading(true); + }} + > + } + label={t('label.clear-search')} + // onClick handled by above `onMouseDown` to prevent race condition with focus shifting away from the input! + onClick={() => {}} + /> + ) : ( ),