This project is read-only.
1

Closed

Two Way Binding doesn't support nested properties

description

  • Eight.Binding.TwoWay balks at bindings like data-win-bind="winControl.checked: blah Eight.Binding.TwoWay".
Proposed fix:
element.addEventListener("change", function propertyChanged() {
    var oldValue, newValue, i = 0;

    if (elementProperties.length === 1) {
        newValue = element[elementProperties[0]];
    }
    else {
        // Yes eval is evil, but we need this to evaluate the property correctly.
        newValue = eval("element['" + elementProperties.join("']['") + "']");
    }
    oldValue = model[modelProperties[0]];
    if (oldValue !== newValue) {
        model[modelProperties[0]] = newValue;
    }
});
Closed Apr 10, 2013 at 4:26 AM by gotdibbs

comments

wrote Apr 10, 2013 at 4:26 AM

Resolved with changeset 18329: Resolved #938.

wrote May 16, 2013 at 4:51 AM

wrote Nov 28 at 8:12 PM