filtering the collection was the very very wrong way to go about it
authorScott Baker <smbaker@gmail.com>
Mon, 8 Dec 2014 22:45:39 +0000 (14:45 -0800)
committerScott Baker <smbaker@gmail.com>
Mon, 8 Dec 2014 22:45:39 +0000 (14:45 -0800)
planetstack/core/xoslib/static/js/xoslib/xos-backbone.js

index 1f4ca5b..a39737d 100644 (file)
@@ -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;