roojs-ui.js
[roojs1] / Roo / form / ComboBox.js
index f816ebf..0117cc2 100644 (file)
@@ -642,13 +642,9 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
      */
     getValue : function(){
         if(this.valueField){
-            if(this.editable && this.selectedIndex == -1){
-                return this.lastQuery ? this.lastQuery : this. value;
-            }
             return typeof this.value != 'undefined' ? this.value : '';
-        }else{
-            return Roo.form.ComboBox.superclass.getValue.call(this);
         }
+        return Roo.form.ComboBox.superclass.getValue.call(this);
     },
 
     /**
@@ -731,6 +727,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
     reset : function(){
         // overridden so that last data is reset..
         this.setValue(this.resetValue);
+        this.originalValue = this.getValue();
         this.clearInvalid();
         this.lastData = false;
         if (this.view) {
@@ -1066,9 +1063,9 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
         }
         // scroll to?
         this.view.select(match);
-        var sn = Roo.get(this.view.getSelectedNodes()[0])
+        var sn = Roo.get(this.view.getSelectedNodes()[0]);
         sn.scrollIntoView(sn.dom.parentNode, false);
-    }
+    } 
 
     /** 
     * @cfg {Boolean} grow