From 174ba75df8477482e1467c59c824efe82ce4f52f Mon Sep 17 00:00:00 2001 From: Kristof Csillag Date: Wed, 5 Jul 2023 23:39:41 +0200 Subject: [PATCH] Keep showing search suggestions even if there is an error message --- src/app/components/Search/index.tsx | 62 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/src/app/components/Search/index.tsx b/src/app/components/Search/index.tsx index 63f9de34ab..8f74a6a93a 100644 --- a/src/app/components/Search/index.tsx +++ b/src/app/components/Search/index.tsx @@ -156,14 +156,6 @@ const SearchCmp: FC = ({ scope, variant, disabled, onFocusChange: o aria-label={searchPlaceholderTranslated} > onChange(e.target.value)} error={hasError} @@ -201,32 +193,36 @@ const SearchCmp: FC = ({ scope, variant, disabled, onFocusChange: o }} helperText={ value && - value !== valueInSearchParams && - (isTooShort ? ( - - + {isTooShort && ( + <> + + +   + {t('search.error.tooShort')} + +
+ + )} + { + setValue(suggestion) }} - > - -   - {t('search.error.tooShort')} -
-
- ) : ( - { - setValue(suggestion) - }} - /> - )) + /> + + ) } />