1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00

fix: now history is only shown to search bars that have id to save hi… (#5684)

This commit is contained in:
Jaanus Sellin 2023-12-19 14:20:10 +02:00 committed by GitHub
parent 33f82daa8c
commit 42943ada75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,8 @@ export const Search = ({
setValue(initialValue);
}, [initialValue]);
const historyEnabled = showSuggestions && id;
return (
<StyledContainer
ref={searchContainerRef}
@ -223,8 +225,7 @@ export const Search = ({
/>
}
elseShow={
showSuggestions &&
savedQuery && (
historyEnabled && (
<SearchPaper className='dropdown-outline'>
<SearchHistory
onSuggestion={onSearchChange}