diff --git a/bower.json b/bower.json
index d165a8d..9d2c7b1 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "aurelia-ui-virtualization",
- "version": "1.0.0-beta.3.1.1",
+ "version": "1.0.0-beta.3.1.2",
"description": "A plugin that provides a virtualized repeater and other virtualization services.",
"keywords": [
"aurelia",
diff --git a/dist/amd/virtual-repeat.js b/dist/amd/virtual-repeat.js
index 7955ee5..138de82 100644
--- a/dist/amd/virtual-repeat.js
+++ b/dist/amd/virtual-repeat.js
@@ -161,6 +161,9 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t
VirtualRepeat.prototype.bind = function bind(bindingContext, overrideContext) {
this.scope = { bindingContext: bindingContext, overrideContext: overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
};
VirtualRepeat.prototype.call = function call(context, changes) {
@@ -507,7 +510,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t
VirtualRepeat.prototype._calcInitialHeights = function _calcInitialHeights(itemsLength) {
var _this7 = this;
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/aurelia-ui-virtualization.js b/dist/aurelia-ui-virtualization.js
index 9fba45b..414abb0 100644
--- a/dist/aurelia-ui-virtualization.js
+++ b/dist/aurelia-ui-virtualization.js
@@ -633,6 +633,9 @@ export class VirtualRepeat extends AbstractRepeater {
bind(bindingContext, overrideContext): void {
this.scope = { bindingContext, overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
}
call(context, changes): void {
@@ -974,7 +977,7 @@ export class VirtualRepeat extends AbstractRepeater {
}
_calcInitialHeights(itemsLength: number): void {
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/commonjs/virtual-repeat.js b/dist/commonjs/virtual-repeat.js
index 2166872..631b178 100644
--- a/dist/commonjs/virtual-repeat.js
+++ b/dist/commonjs/virtual-repeat.js
@@ -158,6 +158,9 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo
VirtualRepeat.prototype.bind = function bind(bindingContext, overrideContext) {
this.scope = { bindingContext: bindingContext, overrideContext: overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
};
VirtualRepeat.prototype.call = function call(context, changes) {
@@ -504,7 +507,7 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo
VirtualRepeat.prototype._calcInitialHeights = function _calcInitialHeights(itemsLength) {
var _this7 = this;
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/es2015/virtual-repeat.js b/dist/es2015/virtual-repeat.js
index 4bc73cb..3382ac5 100644
--- a/dist/es2015/virtual-repeat.js
+++ b/dist/es2015/virtual-repeat.js
@@ -128,6 +128,9 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in
bind(bindingContext, overrideContext) {
this.scope = { bindingContext, overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
}
call(context, changes) {
@@ -454,7 +457,7 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in
}
_calcInitialHeights(itemsLength) {
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/native-modules/virtual-repeat.js b/dist/native-modules/virtual-repeat.js
index b6c352d..fb3e967 100644
--- a/dist/native-modules/virtual-repeat.js
+++ b/dist/native-modules/virtual-repeat.js
@@ -143,6 +143,9 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in
VirtualRepeat.prototype.bind = function bind(bindingContext, overrideContext) {
this.scope = { bindingContext: bindingContext, overrideContext: overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
};
VirtualRepeat.prototype.call = function call(context, changes) {
@@ -489,7 +492,7 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in
VirtualRepeat.prototype._calcInitialHeights = function _calcInitialHeights(itemsLength) {
var _this7 = this;
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/system/virtual-repeat.js b/dist/system/virtual-repeat.js
index 72abfcb..0c1b958 100644
--- a/dist/system/virtual-repeat.js
+++ b/dist/system/virtual-repeat.js
@@ -193,6 +193,9 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem
VirtualRepeat.prototype.bind = function bind(bindingContext, overrideContext) {
this.scope = { bindingContext: bindingContext, overrideContext: overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
};
VirtualRepeat.prototype.call = function call(context, changes) {
@@ -539,7 +542,7 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem
VirtualRepeat.prototype._calcInitialHeights = function _calcInitialHeights(itemsLength) {
var _this7 = this;
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/dist/temp/aurelia-ui-virtualization.js b/dist/temp/aurelia-ui-virtualization.js
index be965c4..103b6ef 100644
--- a/dist/temp/aurelia-ui-virtualization.js
+++ b/dist/temp/aurelia-ui-virtualization.js
@@ -704,6 +704,9 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust
VirtualRepeat.prototype.bind = function bind(bindingContext, overrideContext) {
this.scope = { bindingContext: bindingContext, overrideContext: overrideContext };
+ if (this._isAttached) {
+ this.itemsChanged();
+ }
};
VirtualRepeat.prototype.call = function call(context, changes) {
@@ -1050,7 +1053,7 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust
VirtualRepeat.prototype._calcInitialHeights = function _calcInitialHeights(itemsLength) {
var _this11 = this;
- if (this._viewsLength > 0 && this._itemsLength === itemsLength || itemsLength <= 0) {
+ if (this._viewsLength > 0 && this._itemsLength === itemsLength || this._viewsLength > 0 && itemsLength < 0) {
return;
}
this._hasCalculatedSizes = true;
diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md
index 01757b7..b3a1f64 100644
--- a/doc/CHANGELOG.md
+++ b/doc/CHANGELOG.md
@@ -1,3 +1,13 @@
+
+# [1.0.0-beta.3.1.2](https://github.com/aurelia/ui-virtualization/compare/1.0.0-beta.3.1.1...v1.0.0-beta.3.1.2) (2017-10-23)
+
+
+### Bug Fixes
+
+* **virtual-repeat:** Changing the items to emty array from scrollable list ([0e0b702](https://github.com/aurelia/ui-virtualization/commit/0e0b702))
+
+
+
# [1.0.0-beta.3.1.1](https://github.com/aurelia/ui-virtualization/compare/1.0.0-beta.3.1.0...v1.0.0-beta.3.1.1) (2017-10-02)
diff --git a/package.json b/package.json
index 3fe46a8..e4f2fe0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "aurelia-ui-virtualization",
- "version": "1.0.0-beta.3.1.1",
+ "version": "1.0.0-beta.3.1.2",
"description": "A plugin that provides a virtualized repeater and other virtualization services.",
"keywords": [
"aurelia",