setItem event fixed

This commit is contained in:
Vladimir Enchev
2015-11-25 10:50:57 +02:00
parent 79f009fb38
commit b207adc6cf
2 changed files with 28 additions and 2 deletions

View File

@ -50,13 +50,14 @@ export class ObservableArray<T> extends observable.Observable implements observa
return this._array[index];
}
setItem(index: number, value: T) {
let oldValue = this._array[index];
this._array[index] = value;
this.notify(<observableArrayDef.ChangedData<T>>{
eventName: CHANGE, object: this,
action: ChangeType.Update,
index: index,
removed: new Array(1),
removed: [oldValue],
addedCount: 1
});
}