Reputation: 69
I have the following Layout:
myLayout = new GoldenLayout({
content:[{
type: 'row',
content:[{
type: 'component',
componentName: 'testComponent',
componentState: {},
id:"Widget-1"
},{
type: 'component',
componentName: 'testComponent',
componentState: {}
}]
}]
});
How do I access the "controlsContainer" for the component with id="Widget-1".
I have tried using myLayout.root.getItemsById("Widget-1").controlsContainer.prepend( DropDown );
but I cant access it. Any thoughts?
Upvotes: 0
Views: 332
Reputation: 69
Got it, just loop through all items of the stack using
myLayout.on( 'stackCreated', function( stack ){}
Then target the correct item using its id.
Upvotes: 1