Properties:
Name | Type | Description |
---|---|---|
data |
Array.<any> | The data items of the model. |
size |
number | [readonly] The current amount of items in the model. |
Extends
Methods
-
Returns the data item at the given position.
Name Type Description n
number The position.
Returns:
Type Description any The data item at that position. -
Inserts a bulk of data items at the given position.
Name Type Description at
number The position to insert at.
bulk
Array.<any> The bulk of data items.
-
Inserts a data item at the given position.
Name Type Description at
number The position to insert at.
data
any The data item.
-
Inserts a data item at the position determined by a comparator function.
Name Type Description data
any The data item.
comparator
function The comparator function.
Returns:
Type Description number The insertion position. -
Removes the data item at the given position.
Name Type Description at
number The position to remove from.
-
Replaces the data item at the given position and returns the previous item.
Name Type Description at
number The position to replace at.
item
any The new item.
Returns:
Type Description any The previous item. -
Resets the model with the given data items.
Name Type Description data
Array.<any> The new data items.
-
Creates a sequence of numbers to be used for the
data
property.Name Type Description from
number The starting number.
n
number The amount of sequential numbers.
Returns:
Type Description Array.<number> A sequence of numbers.
Events
-
Is triggered when data items were inserted.
Name Type Description at
number The position where the items where inserted at.
n
number The amount of items inserted.
-
Is triggered when data items were removed.
Name Type Description at
number The position where the item was removed from.
-
Is triggered when a data item was changed.
Name Type Description at
number The position of the item that was replaced.
-
Is triggered when the model was reset.