ember-m3
Version:
Alternative to @ember-data/model in which attributes and relationships are derived from API Payloads
16 lines (14 loc) • 384 B
JavaScript
import M3RecordArray from './record-array';
/**
* M3ReferenceArray
*
* @class M3ReferenceArray
* @extends {M3RecordArray}
*/
export default class M3ReferenceArray extends M3RecordArray {
replace(idx, removeAmt, newItems) {
super.replace(idx, removeAmt, newItems);
// update attr in recordData and model state
this.record._setAttribute(this.key, this, true);
}
}