Check if an item is hidden in ExtJS

I can do

if( !Ext.getCmp('myElem')) 

to check if an element exists and

 Ext.getCmp('myElem').hide(); 

or

 Ext.getCmp('myElem').show(); 

to hide or show the item.

But how to check if an element is hidden?

 if (Ext.getCmp('myElem') && <*hidden*>){//??? //do something } 

Browsing SO did not help me find the answer.

Thanks.

+4
source share
1 answer

Use isVisible() :

Returns true if this component is visible.

+6
source

Source: https://habr.com/ru/post/1479527/


All Articles