Added pagination template and population template to help create pagination components. Allowed the use of non properties in property arrays for class, style ect.

This commit is contained in:
2020-10-20 13:18:26 -07:00
parent 08f4f9006f
commit c172cb5599
2 changed files with 443 additions and 17 deletions

View File

@ -152,7 +152,7 @@ class IgniteProperty {
this.onSpliceCallbacks = this.onSpliceCallbacks.filter(slice => slice != callback);
}
}
if (Array.isArray(this._value) && this._value.onPushCallbacks) {
//This array has already been patched but attach to it so we get callbacks.
this.arrayCallbacks.push(this._value.attachOnPush((items) => this.invokeOnPush(items)));
@ -261,7 +261,13 @@ IgniteProperty.prototype.toString = function () {
*/
Array.prototype.getPropertyValues = function () {
var ret = [];
this.forEach(prop => ret.push(prop.value));
this.forEach(prop => {
if (prop instanceof IgniteProperty) {
ret.push(prop.value);
} else {
ret.push(prop);
}
});
return ret;
}
@ -274,7 +280,11 @@ Array.prototype.getOldPropertyValues = function (property, oldValue) {
if (prop == property) {
ret.push(oldValue);
} else {
ret.push(prop.value);
if (prop instanceof IgniteProperty) {
ret.push(prop.value);
} else {
ret.push(prop);
}
}
});
return ret;