From f3d18199c635057a152d4a001b42339e23f40901 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 21 Feb 2019 17:00:56 +0800 Subject: [PATCH] Roo/bootstrap/Component.js --- Roo/bootstrap/Component.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Roo/bootstrap/Component.js b/Roo/bootstrap/Component.js index c14252dd19..8d07b86055 100644 --- a/Roo/bootstrap/Component.js +++ b/Roo/bootstrap/Component.js @@ -374,6 +374,30 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, { }, + /** + * xAddChildren - the 'sub-compentized' version of the above idea.. + */ + xAddChildren: function(child_array, skip_children) + { + var nitems = []; + if (!child_array || !child_array.length ) { + this.items = nitems; + return; + } + + for(var i =0;i < child_array.length;i++) { + if (skip_children) { + break; + } + // Roo.log(['add child', items[i]]); + nitems.push(this.xAdd(Roo.apply({}, child_array[i]))); + } + this.items = nitems; + + this.fireEvent('childrenrendered', this); + + }, + /** * Set the element that will be used to show or hide -- 2.39.2