From 5ff31bd5ec59c596ff86c5399e281fcec27d862d Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Mon, 8 Dec 2014 14:45:39 -0800 Subject: [PATCH] filtering the collection was the very very wrong way to go about it --- planetstack/core/xoslib/static/js/xoslib/xos-backbone.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js index 1f4ca5b..a39737d 100644 --- a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js +++ b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js @@ -258,6 +258,14 @@ if (! window.XOSLIB_LOADED ) { model.fetch(options); }, + /* filterBy: note that this yields a new collection. If you pass that + collection to a CompositeView, then the CompositeView won't get + any events that trigger on the original collection. + + Using this function is probably wrong, and I wrote + FilteredCompositeView() to replace it. + */ + filterBy: function(fieldName, value) { filtered = this.filter(function(obj) { return obj.get(fieldName) == value; -- 2.43.0