Closed nnnnathann closed 9 years ago
I wouldn't be in favor of switching it around. This would undoubtly result in similar problems for people using specialized model libraries. I'd be in favor of making this more configurable though. If you could make this more general without linking it to specific libraries I would be in favor.
Maybe something like a library-level config? Something like this:
React.BackboneMixin.ConsiderAsCollection = [Backbone.Collection, FilteredCollection]
or alternatively assign it a function which decides whether this is a model or a collection. Your opinion @clayallsopp ?
I like that solution @markijbema
:+1: I'd prefer allowing configuration, and I think a function is preferable over an array
Hi,
I often use a filtered collection library for collections, and unfortunately they do not test as instances of
Backbone.Collection
, which makes them behave as models using this library (relevant code).What do you think about adding in a way to specify the behavior, or possibly switching the ternary to test Backbone.Model?
Relevant code:
Thank you for sharing your efforts on this library.