The StandaloneSearchBox headless controller offers a high-level interface for designing a common search box UI controller. Meant to be used for a search box that will redirect instead of executing a query.
StandaloneSearchBox
Example: standalone-search-box.fn.tsx
Resets the standalone search box state. To be dispatched on single page applications after the redirection has been triggered.
Clears the search box text and the suggestions.
Selects a suggestion and calls submit.
submit
The string value of the suggestion to select
Shows the suggestions for the current search box value.
Triggers a redirection.
Adds a callback that's invoked on state change.
A callback that's invoked on state change.
A function to remove the listener.
Updates the redirection url of the standalone search box.
The new URL to redirect to.
Updates the search box text value and shows the suggestions for that value.
The string value to update the search box with.
A scoped and simplified part of the headless state that is relevant to the StandaloneSearchBox controller.
The
StandaloneSearchBox
headless controller offers a high-level interface for designing a common search box UI controller. Meant to be used for a search box that will redirect instead of executing a query.Example: standalone-search-box.fn.tsx