Filter Selectors
getFiltersByHash
Section titled “getFiltersByHash”Retrieves a collection of set filters by a result hash.
import { getFiltersByHash } from '@shopgate/engage/filters';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getFiltersByHash } from '@shopgate/pwa-common-commerce/filters'
Parameters
Section titled “Parameters”state(Object) required: The application state.props(Object) required: An object containing props.categoryId(string): The category ID for the hash.searchPhrase(string): The search phrase for the hash
Returns
Section titled “Returns”(Array|null): A collection of set filters. If there are no filters, it returns null.
Filters will match the filters from the getFilters pipeline response.
getActiveFilters
Section titled “getActiveFilters”Retrieves the currently active filters.
import { getActiveFilters } from '@shopgate/engage/filters';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getActiveFilters } from '@shopgate/pwa-common-commerce/filters'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(Array|null): A collection of set filters. If there are no filters, it returns null.
hasActiveFilters
Section titled “hasActiveFilters”Retrieves whether there are any active filters set.
import { hasActiveFilters } from '@shopgate/engage/filters';Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { hasActiveFilters } from '@shopgate/pwa-common-commerce/filters'
Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(boolean): Whether there are any active filters set.

