-
Notifications
You must be signed in to change notification settings - Fork 40
Changelog
Trigger sort on add via @reubenrybnik https://github.com/p3drosola/Backbone.VirtualCollection/pull/103
Support for lodash 4 as thisArg
params support had been dropped via @DenisHomich
Support for lodash 4 which removed alias _.contains in favor of _.includes via @DenisHomich
fix for change:[attributeName] event at model attribute changes via @gregorybarale removed gulp
Use proper changes object when proxying the update event via @RealAdamSinger
Propagate filter
event via @alex-pex
Propagate update
event via @alex-pex
Added license parameter to package.json
Fixed not setting the model property on the virtual collection from the parent collection (via @mllocs)
Added the url collection method to the proxied methods list (via @mllocs)
Fix bug introduced in 0.6.5, causing models to be erroneously added to the index.
Fix issue with changing id attributes (via @andresguton)
Fix reset event signature.
Backbone 1.2.0 compatibility
Rename the global namespace Backbone.virtual-collection -> Backbone.VirtualCollection
Use _.keys instead of Object.keys (fixes #60)
Use _.invoke instead of calling inside a for-in loop (fixes #60)
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