Looks like we can't reproduce the issue or there's a problem in the test case provided.
Using square brackets in field name breaks selectfield reset
Sencha Touch 1.1.0
Tested on iOS 5.0
Ruby on Rails require field names in the following format 'model[property]', so my ST form field names use the same format:
name : 'asb[asb_type_id]',
valueField : 'id',
displayField : 'name',
store : app.stores.asbTypes
xtype : 'textareafield',
name : 'asb[description]',
label : 'Description',
maxLength : 60,
maxRows : 5
This only becomes a problem when reseting a 'selectfield' field. The following error is thrown:
"Invalid ComponentQuery selector: "]""
The error relates to the function called 'child' that is called when the selectfield attempts to reset the picker value, calling a query on something like:
The call stack is:
Picker.setValue() - Line 28589
Picker.child() - Line 25509
This is because the square brackets mean something to ComponentQuery.
Which is why I believe it is a bug. Unless of course W3C doesn't allow square brackets in the name attribute, my impression was that they were allowed.
How can this be closed?
Isn't it a legitimate bug if ComponentQuery is re tasking a legitimate character used in form names?