vendredi 24 novembre 2017

ExtJS: how to get reference to an icon element (as an object) inside button?

I have a button which contains an icon element.The button is referenced to as obj.

And i need to change button icon's visibility by usind .show() and .hide() methods.

Now i do it so (but i feel this is not a true way):

obj.getInnerItems()[0].hide();

It's not good because i rely on a constant component structure, if something changes in the next versions of ExtJS, the logic can be broken.

Are there better practices to solve this problem?




Aucun commentaire:

Enregistrer un commentaire