Modified value function for ignite template to reflect even if the value isn't an ignite property. Cleaned up the code and simplified it.
This commit is contained in:
parent
557584aadd
commit
1ea51c1451
@ -198,6 +198,11 @@ class IgniteTemplate {
|
||||
this._callbacks.push(value.attachOnShift((list) => this.onValueChanged((converter != null ? converter(list) : null))));
|
||||
this._callbacks.push(value.attachOnSplice((list, start, deleteCount, items) => this.onValueChanged((converter != null ? converter(list) : null))));
|
||||
|
||||
this._elementValue = (converter != null ? converter(value.value) : value.value);
|
||||
} else {
|
||||
this._elementValue = (converter != null ? converter(value) : value);
|
||||
}
|
||||
|
||||
if (reflect != null && ((typeof (reflect) == "boolean" && reflect == true) || reflect instanceof Function)) {
|
||||
var valueChanged = () => {
|
||||
var newValue = null;
|
||||
@ -220,7 +225,7 @@ class IgniteTemplate {
|
||||
|
||||
if (reflect instanceof Function) {
|
||||
reflect(newValue);
|
||||
} else {
|
||||
} else if (value instanceof IgniteProperty) {
|
||||
value.setValue(newValue, true);
|
||||
}
|
||||
|
||||
@ -235,11 +240,6 @@ class IgniteTemplate {
|
||||
this.on("keyup", valueChanged);
|
||||
}
|
||||
|
||||
this._elementValue = (converter != null ? converter(value.value) : value.value);
|
||||
} else {
|
||||
this._elementValue = (converter != null ? converter(value) : value);
|
||||
}
|
||||
|
||||
IgniteRendering.pop();
|
||||
return this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user