Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Switch between elements on combobox change

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #11
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,382
    Vote Rating
    858
      0  

    Default

    This isn't really a bug, you'll notice that the CSS3 selectors also don't include a not operator. Instead, you should use :not:

    Code:
    Ext.onReady(function(){
        
        var form = Ext.create('Ext.form.Panel', {
            renderTo: document.body,
            items: [{
                fieldLabel: 'Foo',
                name: 'foo'
            }, {
                fieldLabel: 'Bar',
                name: 'bar'
            }, {
                fieldLabel: 'Baz',
                name: 'baz'
            }]
        });
        
        console.log(form.query(':not([name=foo])'));
        
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  2. #12
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    78
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by evant View Post
    This isn't really a bug, you'll notice that the CSS3 selectors also don't include a not operator. Instead, you should use :not:

    Code:
    Ext.onReady(function(){
        
        var form = Ext.create('Ext.form.Panel', {
            renderTo: document.body,
            items: [{
                fieldLabel: 'Foo',
                name: 'foo'
            }, {
                fieldLabel: 'Bar',
                name: 'bar'
            }, {
                fieldLabel: 'Baz',
                name: 'baz'
            }]
        });
        
        console.log(form.query(':not([name=foo])'));
        
    });
    Ok, that worked, sorta. It excluded my firstName field, but included my textareafield. Using my test case I did
    Code:
    form.query('textfield:not([name=firstName])')
    Last edited by kmanuel@entausa.com; 10 Jul 2012 at 6:10 AM. Reason: update status of post. was partially incorrect

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •