1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    17
    Answers
    1
    Vote Rating
    0
    Madiyana is on a distinguished road

      0  

    Default Unanswered: Combobox + XTemplate trouble

    Unanswered: Combobox + XTemplate trouble


    Hi,
    Following example shows normal combobox until I use XTemplate. After applying XTemplatecombobox items become unclickable (no highlight on hover and no choosing by click).


    Code:
    Ext.onReady(function () {        
    var states = Ext.create('Ext.data.Store', {            
    fields: ['abbr', 'name'],            
    data: [               
            { "abbr": "AL", "name": "Alabama" },         
            { "abbr": "AK", "name": "Alaska" },             
            { "abbr": "AZ", "name": "Arizona" }         
       ],           
     listeners :          {
            'load' : function (store, records, options) {
                  this.insert(0,'--');        
         }}
            });       
     Ext.create('Ext.form.ComboBox', {     
           fieldLabel: 'Choose State',           
           store: states,        
           queryMode: 'local',           
           displayField: 'name',            
           valueField: 'abbr',           
            renderTo: 'divId',          
      tpl: new Ext.XTemplate(           
         '<tpl for="."><div class="x-combo-list-item">{name}</div></tpl>')        }

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,490
    Answers
    526
    Vote Rating
    283
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Please stop posting the same question over and over again. You've asked this at least 4 times now.

    Please post any follow up to the following thread:

    http://www.sencha.com/forum/showthread.php?248668

Thread Participants: 1

Tags for this Thread