guy 8 years ago
parent
commit
34ae74ec25
  1. 18
      bi/base.js
  2. 18
      docs/base.js
  3. 9
      src/base/collection/collection.js
  4. 9
      src/base/grid/grid.js

18
bi/base.js

@ -2850,10 +2850,16 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -2864,6 +2870,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (items && items !== this.options.items) {
this.options.items = items;
this._calculateSizeAndPositionData();
this.restore();
}
this._populate();
}
@ -14953,10 +14960,16 @@ BI.GridView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -14966,6 +14979,7 @@ BI.GridView = BI.inherit(BI.Widget, {
populate: function (items) {
if (items && items !== this.options.items) {
this.options.items = items;
this.restore();
}
this._populate();
}

18
docs/base.js

@ -2850,10 +2850,16 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -2864,6 +2870,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (items && items !== this.options.items) {
this.options.items = items;
this._calculateSizeAndPositionData();
this.restore();
}
this._populate();
}
@ -14953,10 +14960,16 @@ BI.GridView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -14966,6 +14979,7 @@ BI.GridView = BI.inherit(BI.Widget, {
populate: function (items) {
if (items && items !== this.options.items) {
this.options.items = items;
this.restore();
}
this._populate();
}

9
src/base/collection/collection.js

@ -340,10 +340,16 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -354,6 +360,7 @@ BI.CollectionView = BI.inherit(BI.Widget, {
if (items && items !== this.options.items) {
this.options.items = items;
this._calculateSizeAndPositionData();
this.restore();
}
this._populate();
}

9
src/base/grid/grid.js

@ -312,10 +312,16 @@ BI.GridView = BI.inherit(BI.Widget, {
this.renderRange = {};
},
_clearChildren: function () {
this.container._children = {};
this.container.attr("items", []);
},
restore: function () {
BI.each(this.renderedCells, function (i, cell) {
cell.el.destroy();
cell.el._destroy();
});
this._clearChildren();
this.renderedCells = [];
this.renderedKeys = [];
this.renderRange = {};
@ -325,6 +331,7 @@ BI.GridView = BI.inherit(BI.Widget, {
populate: function (items) {
if (items && items !== this.options.items) {
this.options.items = items;
this.restore();
}
this._populate();
}

Loading…
Cancel
Save