
Loading…
Annotated attribute binding issues #1874
robrez
commented
Owner
kevinpschaaf
commented
As you noted in #1877 (comment), what you are seeing is a result of Polymer's rule to not call observers/computing functions with undefined dependencies (discussed in docs here), which has both performance and ergonomic benefits, but has this side-effect of slightly unintuitive results when structured data may have optional properties that lead to undefined dependencies.
In this case, I'd recommend using a wildcard argument, which guarantees the function is called for each change to the base object and sub-properties thereof:
http://plnkr.co/edit/EyibXcM5hFYrpEbxZ3Jq?p=preview
We'll consider improvements to this API on #1877, so we'll go ahead and close this issue.
robrez
commented
Thanks for the help
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having trouble w/ a callback not executing whenever an annotated attribute binding uses a function which takes multiple args and one of them is undefined.
If I limit the number of arguments to 1, everything seems to work as expected.
Here's a plnkr
http://plnkr.co/edit/FlN0SJmmjgyEJRlkRE0w?p=preview
Note: That example uses
dom-repeat, but I'm getting the same result when using a standalone object outside of any repeater.