backbone.collectionsubset
backbone.collectionsubset copied to clipboard
Reinserting models into subcollections at a specific index (comparators?)
I have a subcollection and part of my filter for this subcollection is a 'deleted' flag, so I can delete and undelete models.
My issue is that when I delete and undelete any amount of models, undeleting simple appends the models to the end of the subcollection and I want them to go back to the index they were at before.
I think being able to have a comparator on the subcollection would also be able to solve this issue. Are comparators available?
You can set a comparator when calling subcollection in my fork here: https://github.com/zawaideh/backbone.collectionsubset