Roo/form/TextItem.js
authorEdward <edward@roojs.com>
Thu, 7 Mar 2019 04:14:56 +0000 (12:14 +0800)
committerEdward <edward@roojs.com>
Thu, 7 Mar 2019 04:14:56 +0000 (12:14 +0800)
Roo/form/TextItem.js

index 8331f93..8362052 100644 (file)
@@ -42,6 +42,22 @@ Roo.extend(Roo.form.TextItem, Roo.BoxComponent,  {
         
         return cfg;
         
+    },
+    
+    onRender : function(ct, position)
+    {
+        Roo.form.TextItem.superclass.onRender.call(this, ct, position);
+        
+        if(!this.el){
+            var cfg = this.getAutoCreate();
+            if(!cfg.name){
+                cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name;
+            }
+            if (!cfg.name.length) {
+                delete cfg.name;
+            }
+            this.el = ct.createChild(cfg, position);
+        }
     }
     
 });
\ No newline at end of file