Roo/form/ComboBoxArray.js
[roojs1] / Roo / form / ComboBoxArray.js
index 780c574..41635c8 100644 (file)
@@ -101,6 +101,10 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
         
         this.combo = Roo.factory(this.combo, Roo.form);
         this.combo.onRender(ct, position);
+        if (typeof(this.combo.width) != 'undefined') {
+            this.combo.onResize(this.combo.width,0);
+        }
+        
         this.combo.initEvents();
         
         // assigned so form know we need to do this..
@@ -285,7 +289,7 @@ Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
                 if (!li.length) {
                     return;
                 }
-                add = {};
+                var add = {};
                 add[this.valueField] = k;
                 add[this.displayField] = li.item(0).data[this.displayField];
                 
@@ -414,5 +418,4 @@ Roo.extend(Roo.form.ComboBoxArray.Item, Roo.BoxComponent, {
         this.cb.updateHiddenEl();
     }
     
-    
 });
\ No newline at end of file