Ignite properties now patch lists to capture push/pop events so that when used in a list template the whole list doesn't have to be rerendered. Also cleaned up some code and moved things around.

This commit is contained in:
2020-08-22 16:15:45 -07:00
parent a22d5cc6aa
commit 56530fc966
4 changed files with 154 additions and 27 deletions

View File

@@ -38,9 +38,8 @@ class IgniteElement extends HTMLElement {
var keys = Object.keys(props);
for (var i = 0; i < keys.length; i++) {
var prop = new IgniteProperty();
let prop = new IgniteProperty(props[keys[i]]);
this[`_${keys[i]}`] = prop;
prop._value = props[keys[i]];
((propName) => {
Object.defineProperty(this, propName, {
@@ -56,8 +55,6 @@ class IgniteElement extends HTMLElement {
this[`_${propName}`].value = value;
}
});
})(keys[i]);
}
}