mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): iterable ObservableArray (#9824)
BREAKING CHANGE: Method push will now handle arguments just like Array.prototype.push. Certain existing methods will now return ObservableArray instance instead. Callback arguments that contained an array argument themselves will now contain an ObservableArray argument.
This commit is contained in:
committed by
Nathan Walker
parent
ad01e6b990
commit
df74a8baa8
@@ -20,6 +20,9 @@ previous_url: /ApiReference/data/observable-array/HOW-TO
|
||||
### Set ObservableArray length to new value.
|
||||
{%snippet observable-array-newvalue%}
|
||||
|
||||
### Set ObservableArray to be iterable.
|
||||
{%snippet observable-array-iterable%}
|
||||
|
||||
### Get item at specified index using getItem(index) method.
|
||||
{%snippet observable-array-getitem%}
|
||||
|
||||
@@ -56,12 +59,6 @@ previous_url: /ApiReference/data/observable-array/HOW-TO
|
||||
### Handle "change" event to know more info about the change after calling push() method with multiple elements.
|
||||
{%snippet observable-array-push-multiple-info%}
|
||||
|
||||
### Use push() method to add multiple elements from source array to the ObservableArray.
|
||||
{%snippet observable-array-push-source%}
|
||||
|
||||
### Handle "change" event to know more info about the change after calling push() method with multiple elements from source array.
|
||||
{%snippet observable-array-push-source-info%}
|
||||
|
||||
### Use reverse() method to reverse the elements order of the ObservableArray.
|
||||
{%snippet observable-array-reverse%}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user