mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed Issue ##1235: ObservableArray does not raise its change event when its `length' property is set.
This commit is contained in:
@@ -70,8 +70,7 @@ export class ObservableArray<T> extends observable.Observable implements observa
|
||||
}
|
||||
set length(value: number) {
|
||||
if (types.isNumber(value) && this._array && this._array.length !== value) {
|
||||
this._array = this._array.slice(0, value);
|
||||
this._notifyLengthChange();
|
||||
this.splice(value, this._array.length - value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user