fix: added current language as a dependency to select dropdown (#23377)

This commit is contained in:
Vinz000 2025-09-16 08:28:47 +01:00 committed by GitHub
parent 61ed53f7b2
commit 2f27a7a486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ export const GlobalSearchBar = () => {
const { isNLPEnabled, isNLPActive, setNLPActive, setNLPEnabled } = const { isNLPEnabled, isNLPActive, setNLPActive, setNLPEnabled } =
useSearchStore(); useSearchStore();
const searchContainerRef = useRef<HTMLDivElement>(null); const searchContainerRef = useRef<HTMLDivElement>(null);
const { t } = useTranslation(); const { t, i18n } = useTranslation();
const [isSearchBlur, setIsSearchBlur] = useState<boolean>(true); const [isSearchBlur, setIsSearchBlur] = useState<boolean>(true);
const [suggestionSearch, setSuggestionSearch] = useState<string>(''); const [suggestionSearch, setSuggestionSearch] = useState<string>('');
const location = useCustomLocation(); const location = useCustomLocation();
@ -89,7 +89,7 @@ export const GlobalSearchBar = () => {
))} ))}
</Select> </Select>
), ),
[searchCriteria] [searchCriteria, i18n.language]
); );
const handleSelectOption = useCallback((text: string) => { const handleSelectOption = useCallback((text: string) => {