Skip to content

Commit b3ca733

Browse files
committed
[fix] parameters of datacollection map(), mapRange() in examples
1 parent 7e27ab9 commit b3ca733

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/data_collection/api/datacollection_map_method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A new array of items where each item is the result of the callback function.
2121

2222
@example:
2323
//getting ids of all items of the component
24-
component.data.map(function(item){
24+
component.data.map(function(item, index, array){
2525
return item.id;
2626
});
2727

docs/data_collection/api/datacollection_maprange_method.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ description: You can explore the mapRange method of DataCollection in the docume
2222
A new array of matching item objects.
2323

2424
@example:
25-
const result = component.data.mapRange(0, 20, function(item, index) {
25+
const result = component.data.mapRange(0, 20, function(item, index, array) {
2626
console.log(item.id, index);
2727
});
2828

0 commit comments

Comments
 (0)