@@ -34,6 +45,7 @@ const SearchFilterWidget: React.FC<{
variant={appliedFilters.length ? 'light' : 'outline-primary'}
size="sm"
onClick={open}
+ iconBefore={props.icon}
iconAfter={ArrowDropDown}
>
{props.label}
@@ -51,6 +63,21 @@ const SearchFilterWidget: React.FC<{
style={{ textAlign: 'start' }}
>
{props.children}
+
+ {
+ !!appliedFilters.length
+ && (
+
+
+
+ )
+ }
>
diff --git a/src/search-modal/SearchKeywordsField.tsx b/src/search-manager/SearchKeywordsField.tsx
similarity index 94%
rename from src/search-modal/SearchKeywordsField.tsx
rename to src/search-manager/SearchKeywordsField.tsx
index e63d0eb59e..78bb3d9cd6 100644
--- a/src/search-modal/SearchKeywordsField.tsx
+++ b/src/search-manager/SearchKeywordsField.tsx
@@ -3,7 +3,7 @@ import React from 'react';
import { useIntl } from '@edx/frontend-platform/i18n';
import { SearchField } from '@openedx/paragon';
import messages from './messages';
-import { useSearchContext } from './manager/SearchManager';
+import { useSearchContext } from './SearchManager';
/**
* The "main" input field where users type in search keywords. The search happens as they type (no need to press enter).
diff --git a/src/search-manager/SearchManager.ts b/src/search-manager/SearchManager.ts
new file mode 100644
index 0000000000..29e45d5c09
--- /dev/null
+++ b/src/search-manager/SearchManager.ts
@@ -0,0 +1,174 @@
+/* eslint-disable react/require-default-props */
+/**
+ * This is a search manager that provides search functionality similar to the
+ * Instantsearch library. We use it because Instantsearch doesn't support
+ * multiple selections of hierarchical tags.
+ * https://github.com/algolia/instantsearch/issues/1658
+ */
+import React from 'react';
+import { useSearchParams } from 'react-router-dom';
+import { MeiliSearch, type Filter } from 'meilisearch';
+
+import { ContentHit, SearchSortOption, forceArray } from './data/api';
+import { useContentSearchConnection, useContentSearchResults } from './data/apiHooks';
+
+export interface SearchContextData {
+ client?: MeiliSearch;
+ indexName?: string;
+ searchKeywords: string;
+ setSearchKeywords: React.Dispatch