devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
77 lines (69 loc) • 3.77 kB
TypeScript
/**
* DevExtreme (ui/drop_down_editor/ui.drop_down_list.d.ts)
* Version: 20.1.7
* Build date: Tue Aug 25 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import '../../jquery_augmentation';
import {
dxElement
} from '../../core/element';
import {
template
} from '../../core/templates/template';
import DataSource from '../../data/data_source';
import {
event
} from '../../events/index';
import {
DataExpressionMixinOptions
} from '../editor/ui.data_expression';
import dxDropDownEditor, {
dxDropDownEditorOptions
} from './ui.drop_down_editor';
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxDropDownListOptions<T = dxDropDownList> extends DataExpressionMixinOptions<T>, dxDropDownEditorOptions<T> {
/** Returns the value currently displayed by the widget. */
displayValue?: string;
/** Specifies a custom template for group captions. */
groupTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
/** Specifies whether data items should be grouped. */
grouped?: boolean;
/** The minimum number of characters that must be entered into the text box to begin a search. Applies only if searchEnabled is true. */
minSearchLength?: number;
/** The text or HTML markup displayed by the widget if the item collection is empty. */
noDataText?: string;
/** A function that is executed when a list item is clicked or tapped. */
onItemClick?: ((e: { component?: T, element?: dxElement, model?: any, itemData?: any, itemElement?: any, itemIndex?: number | any, event?: event }) => any);
/** A function that is executed when a list item is selected or selection is canceled. */
onSelectionChanged?: ((e: { component?: T, element?: dxElement, model?: any, selectedItem?: any }) => any);
/** A function that is executed after the widget's value is changed. */
onValueChanged?: ((e: { component?: T, element?: dxElement, model?: any, value?: any, previousValue?: any, jQueryEvent?: JQueryEventObject, event?: event }) => any);
/** Specifies whether to allow searching. */
searchEnabled?: boolean;
/** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */
searchExpr?: string | Function | Array<string | Function>;
/** Specifies a comparison operation used to search widget items. */
searchMode?: 'contains' | 'startswith';
/** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */
searchTimeout?: number;
/** Gets the currently selected item. */
selectedItem?: any;
/** Specifies whether or not the widget displays unfiltered values until a user types a number of characters exceeding the minSearchLength option value. */
showDataBeforeSearch?: boolean;
/** Specifies the currently selected value. May be an object if dataSource contains objects and valueExpr is not set. */
value?: any;
/** Specifies the DOM events after which the widget's value should be updated. */
valueChangeEvent?: string;
/** Specifies whether text that exceeds the drop-down list width should be wrapped. */
wrapItemText?: boolean;
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** A base class for drop-down list widgets. */
export default class dxDropDownList extends dxDropDownEditor {
constructor(element: Element, options?: dxDropDownListOptions)
constructor(element: JQuery, options?: dxDropDownListOptions)
getDataSource(): DataSource;
}