Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS. Hide all components within a container

I have a window in which I am rendering a number of components like panels etc.

Is there a way I can hide all the components contained in window without having to hide them individually? Something like,

Ext.getComponent('myWindow').hideAllComponents();

I am using extjs 3.4.

like image 619
Pratik Patel Avatar asked Jun 09 '26 11:06

Pratik Patel


1 Answers

If I understood you right, you do not want to hide your window, but the elements in your window. So can do this:

// get window, get element, get all direct children with css selector '*'
var children = Ext.get('myWindow').getEl().down('*')

// hide them all
Ext.each(children,function(child){child.hide();});
like image 187
Christoph Avatar answered Jun 12 '26 01:06

Christoph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!