type

Selection

@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

Void clear()

Clear the selection

enabled

Bool enabled := true

Enable or disable selection.

index

abstract Int? index

Get or set a single index

indexes

abstract Int[] indexes

Selected zero based indexes

isEmpty

abstract Bool isEmpty()

Is the selection currently empty

item

abstract Obj? item

Get or set a single item

items

abstract Obj[] items

Selected items.

multi

Bool multi := false

True to enable multiple selection, false for single selection.

size

abstract Int size()

Number of selected items