Class: BlazeList<T>
ui/list.BlazeList
Type parameters
Name | Type |
---|---|
T | extends BlazeElement <HTMLElement > |
Hierarchy
BlazeElement
<HTMLDivElement
>โณ
BlazeList
Constructors
constructor
โข new BlazeList<T
>(autoScroll?
)
Create a BlazeList.
Type parameters
Name | Type |
---|---|
T | extends BlazeElement <HTMLElement , T > |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
autoScroll | boolean | true | Wether or not new items should be scrolled into view |
Overrides
Defined in
src/ui/list.ts:15
Properties
autoScroll
โข autoScroll: boolean
Defined in
src/ui/list.ts:8
element
โข Readonly
element: HTMLDivElement
Inherited from
Defined in
src/ui/element.ts:9
items
โข items: T
[]
Defined in
src/ui/list.ts:7
keys
โข Readonly
keys: KeyboardHandler
Inherited from
Defined in
src/ui/element.ts:11
mouse
โข Readonly
mouse: MouseHandler
Inherited from
Defined in
src/ui/element.ts:10
touch
โข Readonly
touch: TouchHandler
Inherited from
Defined in
src/ui/element.ts:12
Methods
addItems
โธ addItems(...items
): void
Adds the given items to the list.
Parameters
Name | Type | Description |
---|---|---|
...items | T [] | 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
Name | Type | Description |
---|---|---|
index | number | The 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
Name | Type | Description |
---|---|---|
item | T | The item to remove |
Returns
void
Defined in
src/ui/list.ts:58