Searchbox Widget
When to Use
Use this guide when a facet has many items and you want users to type to filter the visible options client-side.
Decision
Module: facets_searchbox_widget
| ID | Class | Purpose |
|---|---|---|
searchbox_links |
SearchboxLinksWidget | Links with search input above |
searchbox_checkbox |
SearchboxCheckboxWidget | Checkboxes with search input above |
Both widgets add a text input that filters the facet item list client-side via JavaScript. The filtering is purely presentational — it does not trigger a new search query.
Pattern
drush en facets_searchbox_widget
Select "Searchbox Links" or "Searchbox Checkbox" as the widget in facet configuration.
Common Mistakes
- Wrong: Expecting the searchbox to search the full index → Right: The searchbox only filters the already-loaded list of facet items client-side. It does not query the search backend.
See Also
- Widgets — standard widgets
- Reference:
web/modules/contrib/facets/modules/facets_searchbox_widget/