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

index 0f01355..540b967 100644 (file)
@@ -33,20 +33,26 @@ Roo.extend(Roo.form.TextItem, Roo.BoxComponent,  {
      */
     tag : 'div',
     /**
-     * @cfg {String} html the content for this item (default empty)
+     * @cfg {String} html the content for this item
      */
     html : '',
+    /**
+     * @cfg {String} cls the class for this item
+     */
+    cls : '',
     
     getAutoCreate : function()
     {
         var cfg = {
-            tag: this.tag
+            id: this.id,
+            tag: this.tag,
+            html: this.html
         }
-        var cfg = typeof this.autoCreate == "object" ?
-                      this.autoCreate : Roo.apply({}, this.defaultAutoCreate);
-        if(this.id && !cfg.id){
-            cfg.id = this.id;
+        
+        if(this.cls) {
+            cfg.cls = this.cls;
         }
+        
         return cfg;
     },
 });
\ No newline at end of file