Roo/bootstrap/ComboBox.js
authoredward <edward@roojs.com>
Tue, 27 Oct 2015 06:09:40 +0000 (14:09 +0800)
committeredward <edward@roojs.com>
Tue, 27 Oct 2015 06:09:40 +0000 (14:09 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/ComboBox.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index a30bb33..320bcf1 100644 (file)
@@ -1370,7 +1370,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         q = qe.query;
         
         forceAll = qe.forceAll;
-        if(forceAll === true || (q.length >= this.minChars) || (this.tickable && this.editable)){
+        if(forceAll === true || (q.length >= this.minChars)){
             
             this.hasQuery = true;
             
index a0dbbb1..589cc27 100644 (file)
@@ -11987,7 +11987,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         q = qe.query;
         
         forceAll = qe.forceAll;
-        if(forceAll === true || (q.length >= this.minChars) || (this.tickable && this.editable)){
+        if(forceAll === true || (q.length >= this.minChars)){
             
             this.hasQuery = true;
             
index e2416ea..bd4d035 100644 (file)
@@ -260,7 +260,7 @@ rm=true;return;}});if(rm){return;}
 this.tickItems.push(r.data);if(typeof(e)=='undefined'&&A==false){Roo.get(D.view.getNodes(C,C)[0]).select('input',true).first().dom.checked=true;}return;}if(r){this.onSelect(r,C);}if(B!==false&&!this.blockFocus){this.inputEl().focus();}},restrictHeight:function(){this.list.alignTo(this.inputEl(),this.listAlign);this.list.alignTo(this.inputEl(),this.listAlign);},onEmptyResults:function(){if(this.tickable&&this.editable){this.restrictHeight();return;}
 this.collapse();},isExpanded:function(){return this.list.isVisible();},selectByValue:function(v,A){if(v!==undefined&&v!==null){var r=this.findRecord(this.valueField||this.displayField,v);if(r){this.select(this.store.indexOf(r),A);return true;}}return false;},select:function(A,B){this.selectedIndex=A;this.view.select(A);if(B!==false){var el=this.view.getNode(A);if(el){this.list.scrollChildIntoView(el,false);}}},selectNext:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else if(this.selectedIndex<ct-1){this.select(this.selectedIndex+1);}}},selectPrev:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else if(this.selectedIndex!=0){this.select(this.selectedIndex-1);}}},onKeyUp:function(e){if(this.editable!==false&&!e.isSpecialKey()){this.lastKey=e.getKey();this.dqTask.delay(this.queryDelay);}},validateBlur:function(){return !this.list||!this.list.isVisible();},initQuery:function(){var v=this.getRawValue();if(this.tickable&&this.editable){v=this.tickableInputEl().getValue();}
 this.doQuery(v);},doForce:function(){if(this.inputEl().dom.value.length>0){this.inputEl().dom.value=this.lastSelectionText===undefined?'':this.lastSelectionText;}},doQuery:function(q,A){if(q===undefined||q===null){q='';}var qe={query:q,forceAll:A,combo:this,cancel:false};if(this.fireEvent('beforequery',qe)===false||qe.cancel){return false;}
-q=qe.query;A=qe.forceAll;if(A===true||(q.length>=this.minChars)||(this.tickable&&this.editable)){this.hasQuery=true;if(this.lastQuery!=q||this.alwaysQuery){this.lastQuery=q;if(this.mode=='local'){this.selectedIndex=-1;if(A){this.store.clearFilter();}else {this.store.filter(this.displayField,q);}
+q=qe.query;A=qe.forceAll;if(A===true||(q.length>=this.minChars)){this.hasQuery=true;if(this.lastQuery!=q||this.alwaysQuery){this.lastQuery=q;if(this.mode=='local'){this.selectedIndex=-1;if(A){this.store.clearFilter();}else {this.store.filter(this.displayField,q);}
 this.onLoad();}else {this.store.baseParams[this.queryParam]=q;var B={params:this.getParams(q)};if(this.loadNext){B.add=true;B.params.start=this.page*this.pageSize;}if(this.loadOnce&&this.store.getCount()>0){this.selectedIndex=-1;if(A){this.store.clearFilter();}else {this.store.filter(this.displayField,q);}
 this.onLoad();return;}
 this.store.load(B);}}else {this.selectedIndex=-1;this.onLoad();}}