استفاده مقدماتی

When initializing a typeahead, you pass the plugin method one or more datasets. The source of a dataset is responsible for computing a set of suggestions for a given query.

Bloodhound

Suggestion Engine - For more advanced use cases, rather than implementing the source for your dataset yourself, you can take advantage of Bloodhound, the typeahead.js suggestion engine.

Prefetch

Prefetched data is fetched and processed on initialization. If the browser supports local storage, the processed data will be cached there to prevent additional network requests on subsequent page loads.

پیشنهاد های پیش فرض

Default suggestions can be shown for empty queries by setting the minLength option to 0 and having the source return suggestions for empty queries.

مجموعه داده های چندگانه

Use multiple datasets like this

منوی کشویی قابل اسکرول

You can use scrollable drowdown