title: How to filter a list in Sencha Touch 2?
body: <p>I'm filtering a list of stocks by symbol, but it doesn't work. Maybe there's something wrong with the code? Something I have missed? Here are some of things I've tried:</p>
  
  <pre class="lang-js prettyprint-override"><code>function filterBySymbol: function(select, value) {
  
      var ordersStore = this.getBrokerageOrderHistoryList().getStore();
  
      ordersStore.clearFilter();
  
      if (value !== '') {
          ordersStore.data.filterBy(function (record, id) {
              // log to make certain this gets called (and it is)
              console.log(id, record.get('symbol') === value);
              return record.get('symbol') === value;
          });
  
  // Other things I've tried (nothing worked):
  // 1)
  //          var f = new Ext.util.Filter({
  //             filterFn: function(record) {
  //                return record.get('symbol') === value;
  //             }
  //          });
  //          ordersStore.filterBy(f);
  // 2)
  //          ordersStore.filter(function (record) {
  //              return record.get('symbol') === value;
  //          });
  // 3)
  //          this.getBrokerageOrderHistoryList().setStore(ordersStore);
  //          this.getBrokerageOrderHistoryList().refresh();
      }
  }
  </code></pre>