diff --git a/docs/search-ui-react.facetsprops.excludedfieldids.md b/docs/search-ui-react.facetsprops.excludedfieldids.md new file mode 100644 index 000000000..ea330c1e5 --- /dev/null +++ b/docs/search-ui-react.facetsprops.excludedfieldids.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [FacetsProps](./search-ui-react.facetsprops.md) > [excludedFieldIds](./search-ui-react.facetsprops.excludedfieldids.md) + +## FacetsProps.excludedFieldIds property + +List of filter ids that should not be displayed. + +Signature: + +```typescript +excludedFieldIds?: string[]; +``` diff --git a/docs/search-ui-react.facetsprops.md b/docs/search-ui-react.facetsprops.md index f9adc94d9..6a2ac75a1 100644 --- a/docs/search-ui-react.facetsprops.md +++ b/docs/search-ui-react.facetsprops.md @@ -18,5 +18,6 @@ export interface FacetsProps | --- | --- | --- | | [children?](./search-ui-react.facetsprops.children.md) | ReactElement\[\] \| ReactElement \| undefined \| null | (Optional) The custom facet components that will override the default rendering. | | [customCssClasses?](./search-ui-react.facetsprops.customcssclasses.md) | [FacetsCssClasses](./search-ui-react.facetscssclasses.md) | (Optional) CSS classes for customizing the component styling. | +| [excludedFieldIds?](./search-ui-react.facetsprops.excludedfieldids.md) | string\[\] | (Optional) List of filter ids that should not be displayed. | | [searchOnChange?](./search-ui-react.facetsprops.searchonchange.md) | boolean | (Optional) Whether or not a search is automatically run when a filter is selected. Defaults to true. | diff --git a/etc/search-ui-react.api.md b/etc/search-ui-react.api.md index 7fb08c2bc..82b5d8ffb 100644 --- a/etc/search-ui-react.api.md +++ b/etc/search-ui-react.api.md @@ -10,7 +10,7 @@ import { AnalyticsConfig } from '@yext/analytics'; import { AnalyticsService } from '@yext/analytics'; import { AutocompleteResponse } from '@yext/search-headless-react'; import { DirectAnswer as DirectAnswer_2 } from '@yext/search-headless-react'; -import { DisplayableFacetOption } from '@yext/search-core'; +import { DisplayableFacetOption } from '@yext/search-headless-react'; import { FieldValueStaticFilter } from '@yext/search-headless-react'; import { FilterSearchResponse } from '@yext/search-headless-react'; import { HighlightedValue } from '@yext/search-headless-react'; @@ -220,6 +220,7 @@ export interface FacetsCssClasses { export interface FacetsProps { children?: ReactElement[] | ReactElement | undefined | null; customCssClasses?: FacetsCssClasses; + excludedFieldIds?: string[]; searchOnChange?: boolean; } diff --git a/src/components/FacetProps.tsx b/src/components/FacetProps.tsx index 7f7654a68..de5de039a 100644 --- a/src/components/FacetProps.tsx +++ b/src/components/FacetProps.tsx @@ -1,4 +1,4 @@ -import { DisplayableFacetOption } from '@yext/search-core'; +import { DisplayableFacetOption } from '@yext/search-headless-react'; import { FilterGroupCssClasses } from './FilterGroup'; import { ReactElement } from 'react'; @@ -22,6 +22,8 @@ export interface FacetsProps { searchOnChange?: boolean, /** CSS classes for customizing the component styling. */ customCssClasses?: FacetsCssClasses, + /** List of filter ids that should not be displayed. */ + excludedFieldIds?: string[], /** The custom facet components that will override the default rendering. * * @remarks diff --git a/test-site/package-lock.json b/test-site/package-lock.json index 762030b58..5a6e34d16 100644 --- a/test-site/package-lock.json +++ b/test-site/package-lock.json @@ -32,7 +32,7 @@ }, "..": { "name": "@yext/search-ui-react", - "version": "1.1.0", + "version": "1.2.0-beta.0", "license": "BSD-3-Clause", "dependencies": { "@microsoft/api-documenter": "^7.15.3", @@ -80,7 +80,7 @@ "@typescript-eslint/eslint-plugin": "^5.16.0", "@typescript-eslint/parser": "^5.16.0", "@yext/eslint-config-slapshot": "^0.5.0", - "@yext/search-headless-react": "^2.1.0", + "@yext/search-headless-react": "^2.2.0-beta.0", "axe-playwright": "^1.1.11", "babel-jest": "^27.0.6", "eslint": "^8.11.0", @@ -97,7 +97,7 @@ "typescript": "~4.5.5" }, "peerDependencies": { - "@yext/search-headless-react": "^2.1.0", + "@yext/search-headless-react": "^2.2.0-beta.0", "react": "^16.14 || ^17 || ^18", "react-dom": "^16.14 || ^17 || ^18" } @@ -20112,7 +20112,7 @@ "@typescript-eslint/parser": "^5.16.0", "@yext/analytics": "^0.2.0-beta.3", "@yext/eslint-config-slapshot": "^0.5.0", - "@yext/search-headless-react": "^2.1.0", + "@yext/search-headless-react": "^2.2.0-beta.0", "axe-playwright": "^1.1.11", "babel-jest": "^27.0.6", "classnames": "^2.3.1",