Roo/bootstrap/Component.js
authorAlan Knowles <alan@roojs.com>
Mon, 21 May 2018 05:27:13 +0000 (13:27 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 21 May 2018 05:27:13 +0000 (13:27 +0800)
Roo/bootstrap/Component.js

index 280c25f..066e826 100644 (file)
@@ -241,14 +241,17 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         var has_flexy = (typeof(tree['flexy:if']) != 'undefined') ||
                     (typeof(tree['flexy:foreach']) != 'undefined');
           
-        if(this[cntr](true) === false){
-            tree.items = [];
-            return cn;
-        }
+    
         
-         skip_children = false;
+        skip_children = false;
         // render the element if it's not BODY.
         if (!is_body) {
+            
+            // if parent was disabled, then do not try and create the children..
+            if(this[cntr](true) === false){
+                tree.items = [];
+                return cn;
+            }
            
             cn = Roo.factory(tree);
            
@@ -311,12 +314,12 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
                 //Roo.log('render');
                 //Roo.log(this[cntr]());
                 // some elements do not have render methods.. like the layouts...
-                
+                /*
                 if(this[cntr](true) === false){
                     cn.items = [];
                     return cn;
                 }
-                
+                */
                 cn.render && cn.render(this[cntr](true));
                 
              }