title: filterPredicate from material table was not working in angular app
body: <p>I want to implement a customer filter for my material table, but as I debugged and set a breakpoint in this customer filter function. but it was not working.</p>
  
  <p>the code is such like this: </p>
  
  <pre><code>
  ngOnInit() {
      if (
        !this.displayedColumns &amp;&amp;
        this.tableData.rows.length &gt; 0 &amp;&amp;
        !this.isFilterAvailable
      ) {
        this.displayedColumns = _.keys(_.first(this.tableData.rows));
      } else {
        this.dataSource.data = this.tableData.rows;
        this.initFilterValues(_.keys(_.first(this.tableData.rows)));
        this.dataSource.filterPredicate = this.createFilter();
      }
      this.dataSource.data = this.tableData.rows;
      this.dataSource.filterPredicate = (data, filter) =&gt; {
        console.log(data + "hier hier hier");
        return true;
      };
    }
  
    initFilterValues(values) {
      values.forEach(key =&gt; {
        this.filters[key] = "";
      });
    }
  
    doFilter(filterValue: string, column: string) {
      this.filters[column] = filterValue.trim().toLocaleLowerCase();
      this.dataSource.filter = JSON.stringify(this.filters);
      this.dataSource.filterPredicate = (data, filter) =&gt; {
        console.log(data + "asdfasdfa");
        return true;
      };
    }
  
    createFilter() {
      console.log("create asdfasdfasdfasdfasdf");
      const filterFunction = function(data, filter): boolean {
        console.log("Function excuted" + data);
        let searchTerms = JSON.parse(filter);
        return true;
      };
      return filterFunction;
    }
  }
  
  </code></pre>
  
  <p>in HTML there is a input field, if I tip something for search, doFilter will be run, but the filterFunktion will show data only the fist row from all data</p>
  
  <p>Best Regards,</p>
  
  <p>Leo</p>