Execute JS Local Script inside certain container

I've implemented local script which generate table of widgets according to their index.

for (let i = config.count - 1; i >= 0; i--) {
                // Clone group config for composite
                const myConf = shmi.cloneObject(groupConfig);
                // Change the name of the composite, so that they are not all named the same
                myConf.name = 'row-' + i;
                // Set placeholder values of the composite
                myConf.replacers = {
                    itemIndex: i
                };
                // Create the composite dynamically
                groups.push(shmi.createControl("group", holder.element, myConf, "div", "after"));
            }

Now this code insert table dynamicaly after my holder element: list-target container. How to change code to insert table directly to the list-target container?

 

 

5 replies