October 2017
Intermediate to advanced
370 pages
8h 57m
English
Autosuggest (or autocomplete) is a nice enhancement to any search: as the user types, partial keyword matches are displayed for the user. Let's add this to our search. To achieve this, we'll do the following:
First, the input text field:
<input name="keywords" type="text" placeholder="Search" on="input-debounced:AMP.setState({ keywords: event.value, autosuggest: event.value}), autosuggest-list.show" ...Read now
Unlock full access