ArrayModel
Defined in: api/node/typescript/models.ts:180 ↗
ArrayModel wraps a JavaScript array for use in .slint views. The underlying
array can be modified with the [[ArrayModel.push]] and [[ArrayModel.remove]] methods.
Extends
Section titled “Extends”Model<T>
Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ArrayModel<
T>(arr):ArrayModel<T>
Defined in: api/node/typescript/models.ts:191 ↗
Creates a new ArrayModel.
Parameters
Section titled “Parameters”T[]
Returns
Section titled “Returns”ArrayModel<T>
Overrides
Section titled “Overrides”Model<T>.constructor
Accessors
Section titled “Accessors”length
Section titled “length”Get Signature
Section titled “Get Signature”get length():
number
Defined in: api/node/typescript/models.ts:199 ↗
Returns the number of entries in the array model.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
Iterator<T>
Defined in: api/node/typescript/models.ts:138 ↗
Returns
Section titled “Returns”Iterator<T>
Inherited from
Section titled “Inherited from”entries()
Section titled “entries()”entries():
IterableIterator<[number,T]>
Defined in: api/node/typescript/models.ts:275 ↗
Returns an iterable of key, value pairs for every entry in the array.
Returns
Section titled “Returns”IterableIterator<[number, T]>
pop():
T|undefined
Defined in: api/node/typescript/models.ts:245 ↗
Removes the last element from the array and returns it.
Returns
Section titled “Returns”T | undefined
The removed element or undefined if the array is empty.
push()
Section titled “push()”push(…
values):void
Defined in: api/node/typescript/models.ts:234 ↗
Pushes new values to the array that’s backing the model and notifies the run-time about the added rows.
Parameters
Section titled “Parameters”values
Section titled “values”…T[]
list of values that will be pushed to the array.
Returns
Section titled “Returns”void
remove()
Section titled “remove()”remove(
index,size):void
Defined in: api/node/typescript/models.ts:260 ↗
Removes the specified number of element from the array that’s backing the model, starting at the specified index.
Parameters
Section titled “Parameters”number
index of first row to remove.
number
number of rows to remove.
Returns
Section titled “Returns”void
rowCount()
Section titled “rowCount()”rowCount():
number
Defined in: api/node/typescript/models.ts:206 ↗
Returns the number of entries in the array model.
Returns
Section titled “Returns”number
Overrides
Section titled “Overrides”rowData()
Section titled “rowData()”rowData(
row):T
Defined in: api/node/typescript/models.ts:215 ↗
Returns the data at the specified row.
Parameters
Section titled “Parameters”number
index in range 0..(rowCount() - 1).
Returns
Section titled “Returns”T
undefined if row is out of range otherwise the data.
Overrides
Section titled “Overrides”setRowData()
Section titled “setRowData()”setRowData(
row,data):void
Defined in: api/node/typescript/models.ts:224 ↗
Stores the given data on the given row index and notifies run-time about the changed row.
Parameters
Section titled “Parameters”number
index in range 0..(rowCount() - 1).
T
new data item to store on the given row index
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”values()
Section titled “values()”values():
IterableIterator<T>
Defined in: api/node/typescript/models.ts:268 ↗
Returns an iterable of values in the array.
Returns
Section titled “Returns”IterableIterator<T>
© 2026 SixtyFPS GmbH