NG Kit

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.

Usage

Import AutocompleteComponent and configure it with the inputs below. The full runnable source is on the Examples tab.

html
<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

NameTypeDefaultDescription
optionsreadonly T[]— (required)The list of options shown in the panel.
filterOptionsFilterOptionsFn<T>createFilterOptions()Custom filtering function. Pass passThroughFilter for server-side search.
loadingbooleanfalseShow a loading indicator and loadingText.
loadingTextstring'Loading…'Message shown while loading.