You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's common to want pass object data to a custom element and want to react to changes in some set of paths in that object. We should consider adding a mechanism to make this pattern easy to implement.
How about inverting the key-value of the dictionary, ie. 'nameChanged': ['obj.name.first', 'obj.name.last'] etc? The list of paths to observe could get quite long. One example would be the various animation properties in g-animation. It would also make it easier to inherit.
Fixed via merging CompoundPathObserver branch, fea8c48.
We added an observe block where custom change handlers can be specified. This has a number of advantages. You can use the change handler names you want. If multiple properties are registered to fire the same change handler, it will only fire once if any of the set of properties changes 'at the same time', and it's possible to observe subpaths (a.b.c). For example,
It's common to want pass object data to a custom element and want to react to changes in some set of paths in that object. We should consider adding a mechanism to make this pattern easy to implement.
It might look like this:
and this would mean, whenever this.obj.name.first|last changes, the nameChanged method should be called.
The text was updated successfully, but these errors were encountered: