Roo/form/ComboNested.js
authorAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2020 06:43:56 +0000 (14:43 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2020 06:43:56 +0000 (14:43 +0800)
Roo/form/ComboNested.js

index 61a5253..ad5213d 100644 (file)
@@ -296,7 +296,23 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, {
     onDoubleClick : function()
     {
         this.collapse(); //??
-    }
-    
+    },
     
+    setValue : function(v){
+        var text = v;
+        if(this.valueField){
+            var r = this.findRecord(this.valueField, v);
+            if(r){
+                text = r.data[this.displayField];
+            }else if(this.valueNotFoundText !== undefined){
+                text = this.valueNotFoundText;
+            }
+        }
+        this.lastSelectionText = text;
+        if(this.hiddenField){
+            this.hiddenField.value = v;
+        }
+        Roo.form.ComboBox.superclass.setValue.call(this, text);
+        this.value = v;
+    },
 });
\ No newline at end of file