js/core/Repeat.js
function (items) {
            var c,
                j;
            if (this.$renderedItems) {
                for (j = this.$renderedItems.length - 1; j >= 0; j--) {
                    c = this.$renderedItems[j];
                    this.$parent.removeChild(c.component);
                    c.component.destroy();
                }
            }
            if (this.$renderedItemsMap) {
                var itemList;
                for (var key in this.$renderedItemsMap) {
                    if (this.$renderedItemsMap.hasOwnProperty(key)) {
                        itemList = this.$renderedItemsMap[key];
                        for (j = itemList.length - 1; j >= 0; j--) {
                            c = itemList[j];
                            this.$parent.removeChild(c.component);
                            c.component.destroy();
                        }
                    }
                }
            }
            this.$renderedItems = [];
            this.$renderedItemsMap = {};
            this.$indexOffset = 0;

            if (items) {
                for (var i = 0; i < items.length; i++) {
                    this._innerRenderItem(items[i], i);
                }
            }
            this.trigger("on:itemsRendered", {}, this);
        }
function (items) {
            var c,
                j;
            if (this.$renderedItems) {
                for (j = this.$renderedItems.length - 1; j >= 0; j--) {
                    c = this.$renderedItems[j];
                    this.$parent.removeChild(c.component);
                    c.component.destroy();
                }
            }
            if (this.$renderedItemsMap) {
                var itemList;
                for (var key in this.$renderedItemsMap) {
                    if (this.$renderedItemsMap.hasOwnProperty(key)) {
                        itemList = this.$renderedItemsMap[key];
                        for (j = itemList.length - 1; j >= 0; j--) {
                            c = itemList[j];
                            this.$parent.removeChild(c.component);
                            c.component.destroy();
                        }
                    }
                }
            }
            this.$renderedItems = [];
            this.$renderedItemsMap = {};
            this.$indexOffset = 0;

            if (items) {
                for (var i = 0; i < items.length; i++) {
                    this._innerRenderItem(items[i], i);
                }
            }
            this.trigger("on:itemsRendered", {}, this);
        }
function ( items ) { var c , j ; if ( this . $renderedItems ) { for ( j = this . $renderedItems . length - 1 ; j >= 0 ; j -- ) { c = this . $renderedItems [ j ] ; this . $parent . removeChild ( c . component ) ; c . component . destroy ( ) ; } } if ( this . $renderedItemsMap ) { var itemList ; for ( var key in this . $renderedItemsMap ) { if ( this . $renderedItemsMap . hasOwnProperty ( key ) ) { itemList = this . $renderedItemsMap [ key ] ; for ( j = itemList . length - 1 ; j >= 0 ; j -- ) { c = itemList [ j ] ; this . $parent . removeChild ( c . component ) ; c . component . destroy ( ) ; } } } } this . $renderedItems = [ ] ; this . $renderedItemsMap = { } ; this . $indexOffset = 0 ; if ( items ) { for ( var i = 0 ; i < items . length ; i ++ ) { this . _innerRenderItem ( items [ i ] , i ) ; } } this . trigger ( "on:itemsRendered" , { } , this ) ; }
Inner render method for a list of items
All rendered items will be removed and destroyed before rendering
@param {Array} items[]
@private
Inner render method for a list of items All rendered items will be removed and destroyed before rendering