diff --git a/packages/web-shared/components/Searchbar/Autocomplete.js b/packages/web-shared/components/Searchbar/Autocomplete.js index 8b5edc1d..c0de1b99 100644 --- a/packages/web-shared/components/Searchbar/Autocomplete.js +++ b/packages/web-shared/components/Searchbar/Autocomplete.js @@ -109,7 +109,7 @@ export default function Autocomplete({ const autocomplete = useMemo(() => { return createAutocomplete({ openOnFocus: true, - plugins: [querySuggestionsPlugin, recentSearchesPlugin], + plugins: [querySuggestionsPlugin], shouldPanelOpen({ state }) { return state.query !== '' || state.collections?.length > 0; }, diff --git a/packages/web-shared/components/Searchbar/SearchResults.js b/packages/web-shared/components/Searchbar/SearchResults.js index 792517cc..f18dc241 100644 --- a/packages/web-shared/components/Searchbar/SearchResults.js +++ b/packages/web-shared/components/Searchbar/SearchResults.js @@ -230,9 +230,7 @@ const SearchResults = ({ autocompleteState, autocomplete }) => { autocompleteState.collections.map((collection, index) => { const { source, items } = collection; // Rendering of Query Suggestions - if ( - ['querySuggestionsPlugin', 'recentSearchesPlugin'].includes(collection.source.sourceId) - ) { + if (['querySuggestionsPlugin'].includes(collection.source.sourceId)) { return (
{collection.source.sourceId === 'querySuggestionsPlugin' && !inputProps.value && ( @@ -327,7 +325,7 @@ const SearchResults = ({ autocompleteState, autocomplete }) => { title={item?.title} subtitle={item?.summary} onClick={() => { - if (collection.source.sourceId === 'pages') { + if (item.source.sourceId === 'pages') { return handleStaticActionPress(item); } return handleActionPress(item);