Reference Source
public class | source

AutoComplete

Represents a ui AutoComplete

See:

Constructor Summary

Public Constructor
public

constructor(id: String, options: Object)

Constructor

Method Summary

Public Methods
public

enable(flag: Boolean): Null

enable or disable the AutoComplete

public

focus(): Null

Focuses the AutoComplete

public

setDataSource(array: String[]): Null

Sets the dataSource of an existing ListView and rebinds it.

public

value(text: String): String

Gets or sets the value of the AutoComplete.

Public Constructors

public constructor(id: String, options: Object) source

Constructor

Params:

NameTypeAttributeDescription
id String

AutoComplete id.

options Object

Config params.

options.placeholder String

The hint displayed by the widget when it is empty.

options.enable Boolean

If false, AutoComplete will be disabled.

options.filter String

The filtering method used to determine the suggestions for the current value. The supported filter values are startswith, endswith and contains.

options.dataSource Object | Array

The data source of the widget which is used to display suggestions for the current value.

options.change function(e: Object): null

Callback function will run on value change event.

options.dataBound function(e: Object): null

Callback function will run on the widget has received data from the data source and it is already rendered.

Public Methods

public enable(flag: Boolean): Null source

enable or disable the AutoComplete

Params:

NameTypeAttributeDescription
flag Boolean

if false, AutoComplete will be disabled

Return:

Null

public focus(): Null source

Focuses the AutoComplete

Return:

Null

public setDataSource(array: String[]): Null source

Sets the dataSource of an existing ListView and rebinds it.

Params:

NameTypeAttributeDescription
array String[]

the ListView's values will be set with this

Return:

Null

public value(text: String): String source

Gets or sets the value of the AutoComplete.

Params:

NameTypeAttributeDescription
text String

The value to set.

Return:

String

The value of the widget if called without arguments.