jmorrell / backbone.obscura

A read-only proxy of a Backbone.Collection that can be filtered, sorted, and paginated.
http://jmorrell.github.io/backbone.obscura/
MIT License
107 stars 19 forks source link

Grouping? #19

Closed fluxsaas closed 10 years ago

fluxsaas commented 10 years ago

Hey,

i just came across the task of grouping models. Would that make sense to use a proxy for that?

i implement that by creating a new grouped collection and wrapping the collection in a new proxy. but i loose the referenz to the original proxy and can't "reset" the original state.

kalle

jmorrell commented 10 years ago

There was a previous issue opened about grouping here: https://github.com/jmorrell/backbone.obscura/issues/10 with some discussion. Ultimately I decided not to add it to Obscura since it adds a lot of complexity, but it would make a good use-case for a separate library. I sketched out an API in that thread and have the skeleton of the library here: https://github.com/jmorrell/backbone-grouped-collection but don't have the time / interest to finish it up at the moment.

If you're interested in working on it, I'd be happy to review your code and help write docs.

fluxsaas commented 10 years ago

ah, cool. if gonna come across more use cases i will have a look!