PDA

View Full Version : Extjs ComponentQuery query selector



kqpro1
26 Oct 2015, 5:04 PM
I have 3 query statments where I query for 3 elements and mask them:




Ext.ComponentQuery.query('Notepanel')[0].mask()
Ext.ComponentQuery.query('[itemId=bannerTopP]')[0].mask();
Ext.ComponentQuery.query('[itemId=bannerBottomP]')[0].mask()


Is there a way to combine all of these and make it into a single statement in the `query` to mask all 3?

joel.watson
27 Oct 2015, 6:24 AM
Hi--

You could combine all the selectors into one query, and then loop over the results:


var matches = Ext.ComponentQuery.query('Notepanel, [itemId=bannerTopP], [itemId=bannerBottomP]');
// loop over array to do what needs to be done

Thanks!
Joel