Collection searching/sorting can be done either client-side or server-side. The
first aim of this document is to make it work well for data-heavy applications
inside the browser.
Filtering
The filtering classes are helpers to handle client-side and server-side
filtering in your collections for your views.
Client Filtering
Filtering in the client allows you to filter your collections and re-render your
views against the filtered collection efficiently. This works by simply
extending Filter and setting the filterFunction:
Sort
Using With Marionette
The primary purpose of this library is to easily build Marionette applications
that don’t depend on the in-built ‘filter’ and ‘sort’ methods. This is intended
as a drop-in replacement where a Backbone.Collection can be used.
To use with CollectionView, simply attach it to the collection as such:
This example sets up a basic filtering setup. One of the key advantages of using
this Filter over the Marionette built-in filter is that you can share this
filtering class between views by just assigning it trivially.