mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: now history is only shown to search bars that have id to save hi… (#5684)
This commit is contained in:
parent
33f82daa8c
commit
42943ada75
@ -155,6 +155,8 @@ export const Search = ({
|
|||||||
setValue(initialValue);
|
setValue(initialValue);
|
||||||
}, [initialValue]);
|
}, [initialValue]);
|
||||||
|
|
||||||
|
const historyEnabled = showSuggestions && id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledContainer
|
<StyledContainer
|
||||||
ref={searchContainerRef}
|
ref={searchContainerRef}
|
||||||
@ -223,8 +225,7 @@ export const Search = ({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
elseShow={
|
elseShow={
|
||||||
showSuggestions &&
|
historyEnabled && (
|
||||||
savedQuery && (
|
|
||||||
<SearchPaper className='dropdown-outline'>
|
<SearchPaper className='dropdown-outline'>
|
||||||
<SearchHistory
|
<SearchHistory
|
||||||
onSuggestion={onSearchChange}
|
onSuggestion={onSearchChange}
|
||||||
|
Loading…
Reference in New Issue
Block a user