I’ve searched the examples and docs and I couldn’t find if its possible to use wildcards in the ComponentQuery query. Id like to do the following:
Ext.ComponentQuery.query('button > menu > menuitem[text="Welcome*"]');
Since the button text will be the current user name for example “Welcome Shaun”.
Try
Ext.ComponentQuery.query(‘menuitem{text.search( \’Menu Item\’ )!=-1}’);
Per the docs, you can use custom expressions. This works for the code I’ve included below: