diff --git a/src/library-authoring/LibraryAuthoringPage.tsx b/src/library-authoring/LibraryAuthoringPage.tsx index 202581e504..76cef54178 100644 --- a/src/library-authoring/LibraryAuthoringPage.tsx +++ b/src/library-authoring/LibraryAuthoringPage.tsx @@ -148,7 +148,7 @@ const LibraryAuthoringPage = ({ returnToLibrarySelection }: LibraryAuthoringPage } else if (currentPath && currentPath in ContentType) { setActiveKey(ContentType[currentPath]); } - }, [location.pathname]); + }, []); useEffect(() => { if (!componentPickerMode) { diff --git a/src/search-manager/SearchManager.ts b/src/search-manager/SearchManager.ts index 3776aaa30a..314c90020a 100644 --- a/src/search-manager/SearchManager.ts +++ b/src/search-manager/SearchManager.ts @@ -147,7 +147,9 @@ export const SearchContextProvider: React.FC<{ setBlockTypesFilter([]); setTagsFilter([]); setProblemTypesFilter([]); - setUsageKey(''); + if (usageKey !== '') { + setUsageKey(''); + } }, []); // Initialize a connection to Meilisearch: