-
Notifications
You must be signed in to change notification settings - Fork 39
Changelog
Replace browserify with better UMD wrapper (via @jacobbuck)
Proxy sync, request & error events from parent collection (via @morantron)
Prevent events from being triggered twice (via @omer)
New build system with browserify. Places "standalone" versions in dist/ for script tag inclusion. Removes support for component, bower, & ender package managers. Use npm, everyone.
Fix 'add' event is triggered twice under certain conditions (via @dremora)
Proxy change:attribute events (via @istrobes, @jvanaert)
Ignore change events with malformed arguments
VirtualCollection 0.5 is a complete re-write of VirtualCollection that brings a lot of improvements.
VirtualCollection now extends Backbone.Collection, more efficient data structures, more intelligent sort handling (special thanks to @disruptek), better performance for nested virtual collections, more extensive test coverage.
All that in half the lines of code!
Every effort has been made to maintain compatibility with v0.4, and in most cases it'll be a drop-in replacement. However, there are a few changes that have been made.
In particular, .models()
is now the .models
array just like backbone. We no longer attach to the Backbone namespace (Backbone.VirtualCollection -> VirtualCollection)
Added virtual_collection.model (via @fcsonline)
Added Backbone.extend (via @enov)
Optimized _models
and get
to access parent collections which are indexed
Pass the correct index in options object on model removal
Trigger reset
in updateFilter (fixes issue with multilayer filtering)
Added Bower support
Added where
and findWhere
. Renamed internal filterFunction
Add add
and remove
proxies. Add index argument to filter function.
Add the updateFilter method (via @justinwinslow)
Add toJSON method (via @gbedardsice)
Add close_with option
Add all collection Underscore iterator proxies
Fix bug with onChange handler not proxying add and remove events correctly
Improve importing with npm
Make filter part of options hash.
This version breaks backwards compatibility. You'll have to update your code.
Fix sort comparator with two args. Add more iterator helper functions
Fix reset event on parent collection
Replace viewHelper with closeWith
Fix unbinding of index listeners
Use cid instead of ids
Fixed issues with comparators specified as a function
Added support for comparators & sorting, separate from the parent collection
Fix buildFilterFromHash not detecting null values