title: SlickGrid Custom Filter
body: <p>Searching through here and it doesn't seem to find the answer. </p>
  
  <p>I setup a pretty complicated grid with SlickGrid. </p>
  
  <p>The search function is in a custom toolbar. Which I wire it up the call to the grid function. </p>
  
  <p>for example:</p>
  
  <p>[HTML]</p>
  
  <pre><code> &lt;input name='name' id='id' class='searchable'&gt;
  </code></pre>
  
  <p>[JS]</p>
  
  <pre><code>$('.searchable').on('change' , function() {
       var searchTerm = {};     
           searchTerm[$(this).attr('name')] = $(this).val();
  
       dataview.setFilterArgs(searchTerm);
       dataview.refresh();
  });
  </code></pre>
  
  <p>And I can see the argument getting pass to the custom filter</p>
  
  <pre><code>var customFilter = function(item, args) {
      ***$.each(args , function(key , val) {
          if (val!=='' &amp;&amp; val!==null) {
             return (item[key] == val);
          }
      });***
  return true;
  }
  </code></pre>
  
  <p>[!] the problem is when you are inside the $.each , if you do "return" it only skip the loop. But there is nothing return to outside of the function. </p>
  
  <p><strong>BUT NOTHING HAPPENS ON THE GRID. NOTHING GET FILTERED</strong></p>
  
  <p>Here is my setup</p>
  
  <pre><code>dataview = new Slick.Data.DataView();
  grid = new Slick.Grid(grid_id , dataview , columns , options);
  grid.selectionModel(new Slick.RowSelectionModel());
  
  grid.init();
  
  dataview.beginUpdate();
  dataview.setItems(gridData);
  dataview.setFilter(customFilter);
  dataview.endUpdate();
  </code></pre>
  
  <p>I have been following the two filter examples from github. But I can't see any different apart from this</p>
  
  <p>if I init the data view with</p>
  
  <pre><code>dataview = new Slick.Data.DataView({inlineFilters: true});
  </code></pre>
  
  <p>I get an error:</p>
  
  <p>Uncaught SyntaxError: Undefined label '_coreloop' (slick.dataview.js line: 639)</p>
  
  <p>Try to read the code but lack of comments ... so I really don't know what is the problem. </p>
  
  <p>Anyone got the similar issue? </p>