开发者

ExtJS combo elements disappear on select

I have a simple combo box with some values in it, populated by a json store. The problem is that when I click the drop down and select a value, all the other values disappear so that I cannot select another value. Heres my code:

Ext.onReady(function() {

  var dropDownStore = new Ext.data.JsonStore({
    autoDestroy: false,
    fields: ['graph', 'displayText'],
    data: [{
        graph: 'all',
        displayText: 'All Posts'
      },
      {
    开发者_运维技巧    graph: 'other',
        displayText: 'Other Posts'
      }
    ],
    autoLoad: false
  });

  var dropDown = new Ext.form.ComboBox({
    disable: false,
    mode: 'local',
    store: dropDownStore,
    valueField: 'graph',
    displayField: 'displayText',
    editable: false,
    listeners: {
      select: function(combo, record) {
        //alert(combo.getValue());
      }
    }
  });
});


Try adding triggerAction:'all' to your combo config. See my answer to a similar question for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜