Help prepare for 2025 → Answer 8 simple questions on our Fall Survey
Open Survey
VirtualArray
Advanced array like class that helps loading items on demand.

Summary

Constructors

constructor

new VirtualArray<T>(length?: number): VirtualArray<T>
Parameter Default Description
length
number

Returns VirtualArray<T>

Properties

changeEvent

Static
changeEvent: string
String value used when hooking to change event.

itemsLoadingEvent

Static
itemsLoadingEvent: string
String value used when hooking to itemsLoading event.

Accessors

length

get length(): number
Gets or sets length for the virtual array.
Returns number

loadSize

get loadSize(): number

Methods

getItem

getItem(index: number): T
Parameter Default Description
index
number

Returns T

load

load(index: number, items: T[]): void
Loads items from an array starting at index.
Parameter Default Description
index
number

items
T[]

Returns void

setItem

setItem(index: number, value: T): void
Parameter Default Description
index
number

value
T

Returns void
Previous
ViewHelper