@@ -11,10 +11,10 @@ description: You can explore the map method of TreeCollection in the documentati
1111@signature : {'map(callback: function, id?: string | number, direct?: boolean): any;'}
1212
1313@params :
14- - ` callback: function ` - the function that will be applied to every item. The function can take three parameters:
15- - ` item: object ` - required, the object of an item
16- - ` index: number ` - optional, the index of an item
17- - ` array: object[] ` - optional, an array with items
14+ - ` callback: function ` - the function that will be applied to every item. The function is called with the following parameters:
15+ - ` item: object ` - the object of an item
16+ - ` index: number ` - the index of an item
17+ - ` array: object[] ` - an array of items the method was called upon
1818- ` id: string | number ` - the ID of a control the child items of which will be included
1919- ` direct: boolean ` - defines whether only direct children of the control will be included in the iteration
2020
@@ -29,17 +29,17 @@ toolbar.paint();
2929
3030To work with all children of a particular control, pass one more parameter to ** map()** - the ID of the control:
3131
32- ~~~ js
32+ ~~~ jsx
3333toolbar .data .map ((item )=> {
3434 // disable items
3535 item .disabled = true ;
3636}," menu_1" );
3737toolbar .paint ();
3838~~~
3939
40- If you want to iterate only through immediate children, set the third parameter to _ false _ :
40+ If you want to iterate only through immediate children, set the third parameter to * false * :
4141
42- ~~~ js
42+ ~~~ jsx
4343toolbar .data .map ((item )=> {
4444 // add a css class to each item
4545 item .css = " highlight" ;
0 commit comments