Asynchronous requests
Simulates a server-side search: options load after each keystroke. A pass-through filterOptions (passThroughFilter) disables client-side filtering so the server decides the results, and loading toggles the loadingText while requests are in flight.
Overview
Examples
Usage
Import AutocompleteComponent and configure it with the inputs below. The full runnable source is on the Examples tab.
<autocomplete
[options]="options()"
[(value)]="value"
[filterOptions]="passThroughFilter"
[loading]="loading()"
loadingText="Searching…"
label="Country" />API
This example demonstrates the inputs below. See the Autocomplete introduction for the complete API — every input, output, content template and filter helper.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
options | readonly T[] | — (required) | The list of options shown in the panel. |
filterOptions | FilterOptionsFn<T> | createFilterOptions() | Custom filtering function. Pass passThroughFilter for server-side search. |
loading | boolean | false | Show a loading indicator and loadingText. |
loadingText | string | 'Loading…' | Message shown while loading. |
