Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

ListEditor

A list field’s editor, as editList hands it.

Type Parameter
Item
Property Modifier Type Description
items readonly readonly DeepReadonly<Item>[] The items as they stand, read-only.
length readonly number -
version readonly number Counts the list’s changes.

clear(): void

Takes every item out.

void


copyFrom(items): void

Takes items whole, each copied.

Parameter Type
items readonly Item[]

void


insert(index, item): void

Adds item at index, moving the rest along.

Parameter Type
index number
item Item

void


push(item): void

Adds item at the end.

Parameter Type
item Item

void


remove(index): void

Takes the item at index out, moving the rest back.

Parameter Type
index number

void


resize(length): void

Grows the list to length with the field’s default item, or cuts it to length.

Parameter Type
length number

void


set(index, item): void

Puts item at index, in place of the one there.

Parameter Type
index number
item Item

void