Dispatch patches when a can-list changes
bmomberger-bitovi
released this
24 May 05:05
·
13 commits
to master
since this release
With this release, changes to a can-list can be properly listened to with canReflect.onPatches().
The patches event is used in CanJS 4.x and later to communicate changes to an object's properties to a listener. This is also how list-like observables communicate push/pop/shift/unshift/splice updates. However, up until this release, patches were not being dispatched by can-list. This prevented live updates to never occur when a stache was reading specific indexes from a can-list. I.e. a stache tag like {{list[0]}}
for some can-list would not change with the list.