-
17 Nov 2012 1:48 PM #1
[4.1.3] ComponentQuery doesn't consider numeric zero as a value
[4.1.3] ComponentQuery doesn't consider numeric zero as a value
"[foo]" should find all 3 buttons in this example, but it only finds 2.
Code:var panel = Ext.create('Ext.Panel', { x: 10, y: 10, width: 250, title: "Panel", renderTo: document.body, items: [{ xtype: 'button', text: 'I am a button', foo: 0 }, { xtype: 'button', text: 'I am a button', foo: 1 }, { xtype: 'button', text: 'I am a button', foo: 2 }] }); panel.add({ xtype: 'displayfield', value: 'Found ' + panel.query('[foo]').length + ' buttons' });
-
17 Nov 2012 6:20 PM #2
Thanks for the report! I have opened a bug in our bug tracker.
-
18 Nov 2012 10:09 AM #3
The test case illustrates the issue, but I would like to include some information in the internal report about your actual use case. What is the circumstance where you would have an attribute on a component with a zero value that you would want to query by?
-
18 Nov 2012 10:20 AM #4
I have a UI that is generated from some remote data. When creating the items, I'm adding an attribute from that remote data, which happens to be numeric. Some time later I'm querying for any item that contains that attribute. Hope that helps.
-
18 Nov 2012 11:20 AM #5
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-7776
in
4.2.0.


Reply With Quote