0 votes
32 views
in Coach Views by (13.5k points)

1 Answer

0 votes
by (13.5k points)
Sometimes when you are creating a custom control you need to select all child Coach Views inside a content area and do something with them e.g. move them to a jquery control etc.

This can be done as follows
var subviews = this.context.element.querySelectorAll("#resizer-layout > div > div");

then you can do something with the child views

var rows = [];
                for (var i=0; i < subviews.length; i++){
                    rows.push({template:subviews[i].id, content: subviews[i].id});
                    if (i < subviews.length-1){
                    rows.push({view:"resizer"});
                    }

                }

Related questions

0 votes
0 answers 167 views
0 votes
0 answers 66 views
0 votes
1 answer 61 views
0 votes
1 answer 200 views
0 votes
1 answer 63 views
0 votes
1 answer 124 views
asked Nov 8, 2018 by BPM Tips Admin (21.5k points)
0 votes
1 answer 30 views
0 votes
0 answers 43 views
0 votes
0 answers 18 views
0 votes
0 answers 146 views
0 votes
1 answer 246 views
0 votes
1 answer 256 views
0 votes
2 answers 256 views
...