Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index 8bc62ab..894f2dd 100644 (file)
@@ -1657,6 +1657,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             if(this.lastQuery != q || this.alwaysQuery){
                 this.lastQuery = q;
                 if(this.mode == 'local'){
+                    Roo.log('it is local');
                     this.selectedIndex = -1;
                     if(forceAll){
                         this.store.clearFilter();
@@ -1675,7 +1676,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     
                     this.onLoad();
                     
-                    
                 }else{
                     
                     this.store.baseParams[this.queryParam] = q;
@@ -1698,7 +1698,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                 }
             }else{
                 this.selectedIndex = -1;
-                this.onLoad();
+                this.onLoad();   
             }
         }
         
@@ -2835,6 +2835,14 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             
             var default_text = '-- SELECT --';
             
+            if(this.placeholder.length){
+                default_text = this.placeholder;
+            }
+            
+            if(this.emptyTitle.length){
+                default_text += ' - ' + this.emptyTitle + ' -';
+            }
+            
             var opt = this.inputEl().createChild({
                 tag: 'option',
                 value : 0,