Search Selectors
getSuggestions
Section titled “getSuggestions”Retrieves the search suggestions for a passed search phrase.
import { getSuggestions } from '@shopgate/engage/search'Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getSuggestions } from '@shopgate/pwa-common-commerce/search'
Parameters
Section titled “Parameters”state(Object) required: The application state.props(Object) required: An object containing props.searchPhrase(string) required: The search phrase to use.
Returns
Section titled “Returns”(Array|null): The found suggestions. If no phrase is passed or no suggestions are found, it returns null.
getSuggestionsFetchingState
Section titled “getSuggestionsFetchingState”Retrieves whether suggestions for a passed search phrase are currently fetching.
import { getSuggestionsFetchingState } from '@shopgate/engage/search'Attention: The path to the old modules is deprecated and will be removed in ENGAGE v7:
import { getSuggestionsFetchingState } from '@shopgate/pwa-common-commerce/search'
Parameters
Section titled “Parameters”state(Object) required: The application state.props(Object) required: An object containing props.searchPhrase(string) required: The search phrase to use.
Returns
Section titled “Returns”(boolean): Whether the suggestions are currently fetching.

