ListEditor
A list field’s editor, as editList hands it.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Item |
Properties
Section titled “Properties”| 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. |
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Takes every item out.
Returns
Section titled “Returns”void
copyFrom()
Section titled “copyFrom()”copyFrom(
items):void
Takes items whole, each copied.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
items |
readonly Item[] |
Returns
Section titled “Returns”void
insert()
Section titled “insert()”insert(
index,item):void
Adds item at index, moving the rest along.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
item |
Item |
Returns
Section titled “Returns”void
push()
Section titled “push()”push(
item):void
Adds item at the end.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
item |
Item |
Returns
Section titled “Returns”void
remove()
Section titled “remove()”remove(
index):void
Takes the item at index out, moving the rest back.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
Returns
Section titled “Returns”void
resize()
Section titled “resize()”resize(
length):void
Grows the list to length with the field’s default item, or cuts
it to length.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
length |
number |
Returns
Section titled “Returns”void
set(
index,item):void
Puts item at index, in place of the one there.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
index |
number |
item |
Item |
Returns
Section titled “Returns”void