These are chat archives for canjs/canjs

Jun 2015
Juan Orozco
Jun 19 2015 14:54
Is there an example where someone has specified the Map to use in a List but X levels deep? So, that myList.attr(0).items.attr(0) instanceof MyCustomMap?
Right now, only the first level uses the custom Map and I need it to apply to all maps in the List.
Matthew Phillips
Jun 19 2015 14:55
i don't follow what you're attempting to do
Nikolay Nadorichev
Jun 19 2015 14:58
@Macrofig are you tried to pass all of your data to constructor of MyCustomMap ?
Juan Orozco
Jun 19 2015 15:15
Here's an example @ccummings helped build.,output
The last check is returning false. I need every map, at any level to be an instance of the custom map.
@Luanre I tried using can.Map instead of a can.List and that worked fine. My understanding, though, is this method is better.
Another consideration is that I each item in the list needs to report it's index within the list dynamically, i.e. the order of items can change at any time and the index needs to be up to date.
Jun 19 2015 16:52
Has anyone figured out how to make dynamic select menus work with can-value? It seems that when the source/filter of the list changes, the displayed selected value always changes to the first item which may not be correct.,js,output