2011-12-14 119 views
1

我正在使用带自动填充功能的组合框。这里是我的代码:extjs combobox中的自动填充功能

  { 
      xtype: 'combobox', 
      typeAhead: true, 
      id: 'search_box', 
      fieldLabel: 'Search', 
      store: ariadneStore, 
      queryMode: 'remote', 
      displayField: 'name', 
      editable: true, 
      forceSelection: false, 
      emptyText: 'Please insert disease term', 
      minChars: 3, 
      hideTrigger: true, 
      selectOnFocus: false, 
      width: 250, 
      listeners: { 
       specialkey: function(field, e){ 
        if (e.getKey() == e.ENTER) {        
         loadResultStore(); 
        } 
       } 
      } 
     }, 

只要我输入一些charackters总是第一个建议获得焦点。那导致,当我点击输入,第一个建议被选中。我更喜欢焦点停留在组合框的文本文件中。有没有办法做到这一点?

回答

3

尝试在您的配置中设置autoSelect: false属性。