Clear search results when emptying search field

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-24 17:50:48 +02:00
parent 7cc98b7293
commit 2d6f052c93
2 changed files with 2 additions and 2 deletions

View file

@ -38,7 +38,7 @@ const submitSearch = (value: string, filter?: SearchFilter) =>
// An empty search doesn't return any results
if (value.length === 0) {
return;
return dispatch(clearSearchResults());
}
dispatch(fetchSearchRequest(value));

View file

@ -220,7 +220,7 @@ const SearchResults = () => {
return (
<>
{filterByAccount ? (
<HStack className='mb-4 border-b border-solid border-gray-200 px-2 pb-4 dark:border-gray-800' space={2}>
<HStack className='border-b border-solid border-gray-200 p-2 pb-4 dark:border-gray-800' space={2}>
<IconButton iconClassName='h-5 w-5' src={require('@tabler/icons/outline/x.svg')} onClick={handleUnsetAccount} />
<Text truncate>
<FormattedMessage