-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature flag to disable autocomplete
This adds a feature flag to disable autocomplete in case of unforeseen problems by returning an empty set of completion results in the response. This is controlled by the env var `GOVUK_DISABLE_SEARCH_AUTOCOMPLETE` already currently used in several other GOV.UK apps to stop the `search_with_autocomplete` component from rendering, and will allow us to consolidate the logic behind disabling autocomplete in a single place instead of having it scattered across several apps (as the component will not render completions if no results are returned).
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters