type

Selection

src @Js
abstract class Selection : Obj

Selection manages the selected items and/or indexes

fields

enabled

Enable or disable selection.

index

Get or set a single index

indexes

Selected zero based indexes

item

Get or set a single item

items

Selected items.

multi

True to enable multiple selection, false for single selection.

methods

clear

Clear the selection

isEmpty

Is the selection currently empty

size

Number of selected items

Slot Details

clear

src Void clear()

Clear the selection

enabled

src Bool enabled := true

Enable or disable selection.

index

src abstract Int? index

Get or set a single index

indexes

src abstract Int[] indexes

Selected zero based indexes

isEmpty

src abstract Bool isEmpty()

Is the selection currently empty

item

src abstract Obj? item

Get or set a single item

items

src abstract Obj[] items

Selected items.

multi

src Bool multi := false

True to enable multiple selection, false for single selection.

size

src abstract Int size()

Number of selected items