selection([start], [end])

Class: List. Method inherited from UIComponent.

Description:

Gets selection description object or sets selection by providing start and end positions.
For text editing component this selects and retrieves selected text.
In list types of components (Table, List, Tree) this selects items or rows if multiple-selection is enabled.

Parameters:

Name Type Description

[start]

number

Start position of selection.

[end]

number

End position of selection. Requires if start argument is provided.

Returns:

Returns this component if arguments are provided, otherwise returns Object of format {start: number, end: number, text: string};

Type: Object | this