0 votes
18 views
in Coach Views by (12.1k points)

1 Answer

0 votes
by (12.1k 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 152 views
0 votes
0 answers 61 views
0 votes
1 answer 46 views
0 votes
1 answer 128 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
0 answers 6 views
0 votes
0 answers 35 views
0 votes
0 answers 13 views
0 votes
0 answers 128 views
0 votes
1 answer 231 views
0 votes
1 answer 235 views
0 votes
2 answers 252 views
...