Skip to main content

Class: BlazeList<T>

ui/list.BlazeList

Type parameters

NameType
Textends BlazeElement<HTMLElement>

Hierarchy

Constructors

constructor

โ€ข new BlazeList<T>(autoScroll?)

Create a BlazeList.

Type parameters

NameType
Textends BlazeElement<HTMLElement, T>

Parameters

NameTypeDefault valueDescription
autoScrollbooleantrueWether or not new items should be scrolled into view

Overrides

BlazeElement.constructor

Defined in

src/ui/list.ts:15

Properties

autoScroll

โ€ข autoScroll: boolean

Defined in

src/ui/list.ts:8


element

โ€ข Readonly element: HTMLDivElement

Inherited from

BlazeElement.element

Defined in

src/ui/element.ts:9


items

โ€ข items: T[]

Defined in

src/ui/list.ts:7


keys

โ€ข Readonly keys: KeyboardHandler

Inherited from

BlazeElement.keys

Defined in

src/ui/element.ts:11


mouse

โ€ข Readonly mouse: MouseHandler

Inherited from

BlazeElement.mouse

Defined in

src/ui/element.ts:10


touch

โ€ข Readonly touch: TouchHandler

Inherited from

BlazeElement.touch

Defined in

src/ui/element.ts:12

Methods

addItems

โ–ธ addItems(...items): void

Adds the given items to the list.

Parameters

NameTypeDescription
...itemsT[]The items to add

Returns

void

Defined in

src/ui/list.ts:29


clearItems

โ–ธ clearItems(): void

Removes all items from the list.

Returns

void

Defined in

src/ui/list.ts:77


removeItem

โ–ธ removeItem(index): void

Removes the item at the given index from the list.

Parameters

NameTypeDescription
indexnumberThe index of the item to remove

Returns

void

Defined in

src/ui/list.ts:51

โ–ธ removeItem(item): void

Removes an item from the list.

Parameters

NameTypeDescription
itemTThe item to remove

Returns

void

Defined in

src/ui/list.ts:58