I found the solution. My views were rendering the danceAssignments collection as part of SyllabusView. Once I added a DanceListView with the collection as its data and had it rendering the DanceViews instead of SyllabusView doing it the dances started sorting properly, and some other very odd behaviors resolved as well.
manpreet
Best Answer
2 years ago
I'm working on my first Backbone.js app and have run into some weird behavior that I'm concerned could indicate a problem in my design. My data looks like this:
I have created this model to represent it:
The FigureAssignmentCollection is sorting automatically when I change the index property of one of its members, but the DanceAssignmentCollection isn't, nor does it sort when I explicitly tell it to. The comparator is called, but if I print out the contents of the collection after the sort they're in the wrong order, and the interface renders them out of order.
Any thoughts?