import { Property, EventHandler, KeyboardEventArgs, isNullOrUndefined, detach, getValue } from '@syncfusion/ej2-base';import { Event, EmitType, Complex } from '@syncfusion/ej2-base';import { removeClass, NotifyPropertyChanges } from '@syncfusion/ej2-base';import { dropDownListClasses } from '../drop-down-list/drop-down-list';import { ComboBox } from '../combo-box/combo-box';import { highlightSearch, revertHighlightSearch } from '../common/highlight-search';import { Search } from '../common/incremental-search';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { FieldSettings, FilteringEventArgs, FilterType, ResultData } from '../drop-down-base/drop-down-base';import { FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { DataManager, Predicate, Query } from '@syncfusion/ej2-data'; import {ComboBoxModel} from "../combo-box/combo-box-model"; /** * Interface for a class AutoComplete */ export interface AutoCompleteModel extends ComboBoxModel{ /** * The `fields` property maps the columns of the data table and binds the data to the component. * * text - Maps the text column from data table for each list item * * value - Maps the value column from data table for each list item * * iconCss - Maps the icon class column from data table for each list item * * groupBy - Group the list items with it's related items by mapping groupBy field * * {% codeBlock src='autocomplete/fields/index.md' %}{% endcodeBlock %} * * > For more details about the field mapping refer to [`Data binding`](../../auto-complete/data-binding) documentation. * * @default { value: null, iconCss: null, groupBy: null} */ fields?: FieldSettingsModel; /** * When set to ‘false’, consider the [`case-sensitive`](../../auto-complete/filtering/#case-sensitive-filtering) * on performing the search to find suggestions. * By default consider the casing. * * @default true */ ignoreCase?: boolean; /** * Allows you to either show or hide the popup button on the component. * * @default false */ showPopupButton?: boolean; /** * When set to ‘true’, highlight the searched characters on suggested list items. * > For more details about the highlight refer to [`Custom highlight search`](../../auto-complete/how-to/custom-search) documentation. * * @default false */ highlight?: boolean; /** * Supports the [`specified number`](../../auto-complete/filtering#filter-item-count) * of list items on the suggestion popup. * * @default 20 */ suggestionCount?: number; /** * Allows additional HTML attributes such as title, name, etc., and * accepts n number of attributes in a key-value pair format. * * {% codeBlock src='autocomplete/htmlAttributes/index.md' %}{% endcodeBlock %} * * @default {} */ htmlAttributes?: { [key: string]: string }; /** * Accepts the external `query` * that execute along with data processing. * * {% codeBlock src='autocomplete/query/index.md' %}{% endcodeBlock %} * * @default null */ query?: Query; /** * Allows you to set [`the minimum search character length'] * (../../auto-complete/filtering#limit-the-minimum-filter-character), * the search action will perform after typed minimum characters. * * @default 1 */ minLength?: number; /** * Determines on which filter type, the component needs to be considered on search action. * The available [`FilterType`](../../auto-complete/filtering/#change-the-filter-type) * and its supported data types are * *
|
* FilterType |
* Description |
* Supported Types |
|
* StartsWith |
* Checks whether a value begins with the specified value. |
* String |
|
* EndsWith |
* Checks whether a value ends with specified value. |
* String |
|
* Contains |
* Checks whether a value contains with specified value. |
* String |