I see questions about properly filtering a CollectionView. None of the prescriptions are working for me. I must not be getting the concept.
If I have a collection of models, and I want to show only those with an attribute "visible" set to "true", I should filter the collection in the CollectionView. I thought this was the right way to do that:
var myCollectionView = new MyCollectionView ({
collection: new FilteredCollection(UnfilteredCollection.where({ visible: 'true' }))
});
When I add 10 models to UnfilteredCollection, 5 with visible=false and 5 with visible=true, and show myCollectionView in a region, I should see 5 items. I'm getting none.
If I drop the filter and just show the UnfilteredCollection, I see all 10 items, so I know I'm wired right other than this filtered stuff.
Setting a VS breakpoint I can see the proper values in the collection's models - 5 visible=false and 5 visible=true.
What am I missing here?