Class Ember.TrackedArray
Module:
ember
An Ember.TrackedArray
tracks array operations. It's useful when you want to
lazily compute the indexes of items in an array after they've been shifted by
subsequent operations.
addItems (index, newItems)
Module:
ember
Defined in packages/ember-runtime/lib/system/tracked_array.js:35
- index
- newItems
Track that newItems
were added to the tracked array at index
.
apply (callback)
Module:
ember
Defined in packages/ember-runtime/lib/system/tracked_array.js:102
- callback
- Function
Apply all operations, reducing them to retain:n, for n
, the number of
items in the array.
callback
will be called for each operation and will be passed the following arguments:
- {array} items The items for the given operation
- {number} offset The computed offset of the items, ie the index in the array of the first item for this operation.
- {string} operation The type of the operation. One of
Ember.TrackedArray.{RETAIN, DELETE, INSERT}
removeItems (index, count)
Module:
ember
Defined in packages/ember-runtime/lib/system/tracked_array.js:74
- index
- count
Track that count
items were removed at index
.