title: Use custom filter for objects in ag-grid
body: <p>I have an ag-grid table and I am passing some objects as data. I want to add some custom filters. Below I have a very simplified version of my problem.</p>
  
  <p>I have an interface <code>VersionInfo</code> which represent the object I am passing to the grid.</p>
  
  <pre><code>export interface VersionInfo {
      version: number;
     // more fields here...
  }
  </code></pre>
  
  <p>Then I specify the schema of the grid and add some data: </p>
  
  <pre><code>columnDefs = [
      {
        headerName: 'Version', 
        field: 'version', 
        filter: 'agNumberColumnFilter',
        comparator: (a, b) =&gt; b.version - a.version,
        cellRenderer: (params: ICellRendererParams) =&gt; {
          return `Custom rendering ${params.data.version.version}`;
        }
      }
  ];
  
  rowData = [
      { version: {version: 3} },
      { version: {version: 5} },
      { version: {version: 8} }
  ];
  </code></pre>
  
  <p>The HTML looks like this:</p>
  
  <pre><code>&lt;ag-grid-angular 
      style="width: 500px; height: 200px;" 
      class="ag-theme-alpine"
      [rowData]="rowData" 
      [columnDefs]="columnDefs"&gt;
  &lt;/ag-grid-angular&gt;
  </code></pre>
  
  <p>Everything is working fine excepet for the <code>comparator</code>. I would assume that it would sort the table in reverse order but nothing is happening instead, I just get the table as specified in <code>rowData</code> and as soon something is written into the filter field all entries are filtered. As mentioned before, this is a simplified version, but the problem is the same. </p>