diff --git a/bi/base.js b/bi/base.js index b14612763..1e4d9ea34 100644 --- a/bi/base.js +++ b/bi/base.js @@ -15616,8 +15616,17 @@ BI.VirtualList = BI.inherit(BI.Widget, { this.element.scrollTop(o.scrollTop); }, + _clearChildren: function () { + BI.each(this.container._children, function (i, cell) { + cell && cell.el._destroy(); + }); + this.container._children = {}; + this.container.attr("items", []); + }, + restore: function () { this.renderedIndex = -1; + this._clearChildren(); this.cache = {}; }, diff --git a/docs/base.js b/docs/base.js index b14612763..1e4d9ea34 100644 --- a/docs/base.js +++ b/docs/base.js @@ -15616,8 +15616,17 @@ BI.VirtualList = BI.inherit(BI.Widget, { this.element.scrollTop(o.scrollTop); }, + _clearChildren: function () { + BI.each(this.container._children, function (i, cell) { + cell && cell.el._destroy(); + }); + this.container._children = {}; + this.container.attr("items", []); + }, + restore: function () { this.renderedIndex = -1; + this._clearChildren(); this.cache = {}; }, diff --git a/src/base/list/virtuallist.js b/src/base/list/virtuallist.js index 025921ded..e4c7e76cd 100644 --- a/src/base/list/virtuallist.js +++ b/src/base/list/virtuallist.js @@ -159,8 +159,17 @@ BI.VirtualList = BI.inherit(BI.Widget, { this.element.scrollTop(o.scrollTop); }, + _clearChildren: function () { + BI.each(this.container._children, function (i, cell) { + cell && cell.el._destroy(); + }); + this.container._children = {}; + this.container.attr("items", []); + }, + restore: function () { this.renderedIndex = -1; + this._clearChildren(); this.cache = {}; },