Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default [CLOSED] ComboBox select event acting weird

    [CLOSED] ComboBox select event acting weird


    Don't know if this is a bug but it looks like it:

    If I add a select event listener to a combobox, the API docs say that the arguments should be Ext.form.Picker field, Mixed value but instead they appear to be like Ext 3: Ext.form.ComboBox combo, Ext.data.Record record, Number index.

    Code:
    var form = new Ext.form.FieldSet({
        renderTo: 'select',
        defaultType: 'combo',
        items: [{
            xtype: 'combo',
            hideLabel: true,
            emptyText: 'Select...',
            displayField: 'name',
            width: 200,
            store: store,
            queryMode: 'local',
            typeAhead: true,
            listeners: {
                'select': function(combo,record){
                    console.log(record); //This is a record but I can interact with it (using get() for example)
                }
            }
        }]
    });
    Problem is, though, that none of them work. If I try to use record.get, an error is thrown:

    record.get is not a function

    But if I look at the object in Firebug, there's indeed a method called get.

    I'm puzzled

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Posts
    159
    Vote Rating
    0
    mdavis6890 is on a distinguished road

      0  

    Default


    The picker supports multiple selections, so what looks at a glance like a record is actually an array of records. Try record[0].get().

    Michael

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2010
    Location
    Jyderup, Denmark
    Posts
    51
    Vote Rating
    0
    lasseok is on a distinguished road

      0  

    Default


    Oh, silly me!

    Thank you!

Similar Threads

  1. Combobox acting as ordinary select element
    By Bensiu in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 30 Jan 2011, 9:59 AM
  2. Replies: 4
    Last Post: 14 Aug 2008, 5:38 AM
  3. Html editor acting weird?
    By carlocb in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 12 Feb 2008, 1:08 PM
  4. [2.0] Resizable examples acting weird in Opera
    By Sadr in forum Ext 2.x: Bugs
    Replies: 0
    Last Post: 19 Jan 2008, 9:08 AM
  5. [fix/bug] ComboBox select event should fire change event also
    By andrei.neculau in forum Community Discussion
    Replies: 1
    Last Post: 22 Sep 2007, 2:57 PM

Thread Participants: 1