0 votes
19 views
in Coach Views by (12.4k points)

1 Answer

0 votes
by (12.4k 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 153 views
0 votes
0 answers 63 views
0 votes
1 answer 47 views
0 votes
1 answer 125 views
0 votes
1 answer 58 views
0 votes
1 answer 96 views
asked Nov 8, 2018 by BPM Tips Admin (11.2k points)
0 votes
1 answer 8 views
0 votes
0 answers 36 views
0 votes
0 answers 14 views
0 votes
0 answers 128 views
0 votes
1 answer 231 views
0 votes
1 answer 235 views
0 votes
2 answers 253 views
...