Results 1 to 3 of 3

Thread: Unable to click additional item added to combobox

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    1

    Default Unable to click additional item added to combobox

    Hi,

    I have a combobox that loads items from a store. I am able to add a custom item. My problem is the newly added item is not clickable (unable to select it)

    Here is what I have so far:

    Code:
    Ext.define("Store", {
        extend: "MI.store.AbstractStore",
        storeId: "Store",
        model: "Model",
        remoteSort: true,
        listeners: {
           load: function(store) {
                store.insert(store.totalCount+1,{id:0, name:'Create New Profile'});
           }
        }
    });
    And for the combobox:
    Code:
            xtype: 'combobox',
             auto: 'selectProfileCombo',
             name: 'profileCombo',
             fieldLabel: 'Profile',
             displayField: 'name',
             valueField: 'id',
             emptyText: 'Select Profile',
             listConfig: {
                   listeners: {
                        itemclick: function(list, record) {
                               if(record.get('id')== 0){
                                    //handle Create New Profile
                                }
                               else{
                                    form.loadRecord(record);
                               }
                   }
             }
    and I load the store in initComponent as :
    Code:
            var store = Store;
             combo.store = store.
             combo.store.load();
    Am I missing anything? Or is there a better way to implement my scenario? Any pointers will be of great help.

    Thank you in advance!

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395
    Answers
    25

    Default

    Which Ext version are you using? This seems to be working fine on 4.2.1: https://fiddle.sencha.com/#fiddle/4nt
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    118

    Default

    This bug still exists, I reported it here:

    http://www.sencha.com/forum/showthre...ed-to-combobox
    Sencha should thank single developers and don't screw them with 5x sales policy.

Posting Permissions

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