Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7776 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    84
    Vote Rating
    4
    lagnat is on a distinguished road

      0  

    Default [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'
        });
    Attached Images

  2. #2
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    220
    Vote Rating
    8
    mike.estes will become famous soon enough

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    220
    Vote Rating
    8
    mike.estes will become famous soon enough

      0  

    Default


    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?

  4. #4
    Ext JS Premium Member
    Join Date
    Oct 2007
    Posts
    84
    Vote Rating
    4
    lagnat is on a distinguished road

      0  

    Default


    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.

  5. #5
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    220
    Vote Rating
    8
    mike.estes will become famous soon enough

      0  

    Default


    Quote Originally Posted by lagnat View Post
    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.
    Thank you, I've updated the internal report.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar