View Full Version : 4.2.0: Uncaught Invalid ComponentQuery selector: "]"

12 Jun 2013, 6:25 AM
I have a tab panel with a title of '[Hello]'

If I try and select this component using a component query with attribute selector:


it fails with

Uncaught Invalid ComponentQuery selector: "]"

tabs.child( 'panel[title=' + selected.data.name + ']' ))

I've tried various ways of escaping the attribute selector but have failed to hit a combination that works.

Is this a bug in Ext? Is there a way of using an attribute selector with an attribute value that contains square brackets?

14 Jun 2013, 9:45 AM
The [ ] characters are reserved within component query today. But, the following may work for you - searches for any panel with a title starting with [Hello

Ext.widget('panel', {
renderTo: document.body,
title: 'Foo',
layout: 'fit',
items: [{
xtype: 'panel',
title: '[Hello]'