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 |
|---|---|---|
|
|
number |
Start position of selection. |
|
|
number |
End position of selection. Requires if |
Returns:
Returns this component if arguments are provided, otherwise returns Object of format {start: number, end: number, text: string};
Type: Object | this
