Reputation: 738
I've got a single page that needs to show multiple little boxes of the same collection sorted different ways.
Is there an event I can use to sort the collection just before rendering and use the same collection in all of the CollectionViews? Or should I make N copies of the collection sorted different ways and wire up the events myself?
I'd really like for all of the views to update when I add/remove an item from the collection.
Upvotes: 1
Views: 47
Reputation: 2624
CollectionView allows for a custom viewComparator option if you want your CollectionView's children to be rendered with a different sort order than the underlying Backbone collection uses.
Upvotes: 1