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
This isn't a Can 3.0 migrate issue, but it would be nice if we could help people convert their can-maps to DefineMap. If they're already using the can-map-define plugin it should be a little easier.
The text was updated successfully, but these errors were encountered:
I upgraded to CanJS 3 early this year, but still use can.Map / can.Model together with can-map-define. The main reason I have not started using DefineMap is the lack of support for event bubbling. can.Map together with can.List has a really strong feature in event bubbling: whenever an event is triggered on a map, it can bubble to lists containing that map.
I have several use cases:
on destroy. Whenever a model is destroyed, it is automatically removed from lists where it's present. With event bubbling, this is possible not only with can.Model, but possible on any can.Map by triggering a destroy event.
for sorting. By triggering a sort event (custom event) on a can.Map, any list containing it can act on that event and sort itself.
filtering. Given a list has a filtered selection of maps, whenever a property is changed on a map, by event bubbling, the list can check whether the map should be removed from the list or not.
To my knowledge, the event bubbling feature is not present in DefineMap, or at least I havent found it.
This isn't a Can 3.0 migrate issue, but it would be nice if we could help people convert their
can-map
s toDefineMap
. If they're already using thecan-map-define
plugin it should be a little easier.The text was updated successfully, but these errors were encountered: