Class MutableArray
publicUses: | Ember.MutableEnumerable , | EmberArray
---|---|
Defined in: | packages/ember-runtime/lib/mixins/mutable_array.js:39 |
Module: | @ember/array |
import MutableArray from '@ember/array/mutable';
This mixin defines the API for modifying array-like objects. These methods can be applied only to a collection that keeps its items in an ordered set. It builds upon the Array mixin and adds methods to modify the array. One concrete implementations of this class include ArrayProxy.
It is important to use the methods in this class to modify arrays so that changes are observable. This allows the binding system in Ember to function correctly.
Note that an Array can change even if it does not implement this mixin. For example, one might implement a SparseArray that cannot be directly modified, but if its underlying enumerable changes, it will change also.
Methods
- addArrayObserver
- addObject
- addObjects
- any
- arrayContentDidChange
- arrayContentWillChange
- clear
- compact
- every
- filter
- filterBy
- find
- findBy
- forEach
- getEach
- includes
- indexOf
- insertAt
- invoke
- isAny
- isEvery
- lastIndexOf
- map
- mapBy
- objectAt
- objectsAt
- popObject
- pushObject
- pushObjects
- reduce
- reject
- rejectBy
- removeArrayObserver
- removeAt
- removeObject
- removeObjects
- replace
- reverseObjects
- setEach
- setObjects
- shiftObject
- slice
- sortBy
- toArray
- uniq
- uniqBy
- unshiftObject
- unshiftObjects
- without
Properties
Events
No documented items
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/classes/MutableArray