Add a Backbone collection for filtering other collections.
Review Request #5313 — Created Jan. 24, 2014 and submitted — Latest diff uploaded
This adds
RB.FilteredCollection
, which presents a filtered view of
another collection.FilteredCollection
takes a dictionary of filters,
which map field names to values. For string fields, the prefix will be
compared, and for other values, direct comparison is used. This can be
expanded as needed down the road to do more complex matches.When the main collection updates, the
FilteredCollection
will update as
well, according to the filter.
Unit tests pass.
Tested manually with another change that makes use of this.