title: Angular material checkboxes filter are not filtering the mat table. No errors in the terminal and console
body: <p>I have written the codes to the best of my ability, but the checkbox function is not filtering the table. These are the lines of codes on the ts file</p>
  <pre><code>displayColumns: string[] = ['createDate', 'createdBy', 'status', 'transactionNumber', 'transactionType', 'party', 'id'];
  
  filterOptions(positionValue: string[], nameValue: string[]): ITransactionDetail[] { if ((!positionValue || positionValue.length === 0) &amp;&amp; !nameValue) { return this.data; } const filtered = this.data.filter(periodicElement =&gt; { return ( (nameValue ? periodicElement.transactionType.toLowerCase().includes(nameValue.toString().toLowerCase()) : false) || (positionValue ? positionValue.includes(periodicElement.id + '') : false) ); }); return filtered; }
  
  applyFilter(filterValue: string) { this.dataSource.filter = filterValue.trim().toLowerCase(); this.dataSource.filter = filterValue; }
  
  
  customFilterPredicate() { const myFilterPredicate = function(data: ITransactionDetail, filter: string): boolean { const searchString = JSON.parse(filter); return ( data.id .toString() .trim() .includes(searchString.position) &amp;&amp; data.transactionType .toString() .trim() .toLowerCase() .includes(searchString.transactionType.toLowerCase()) ); }; return myFilterPredicate; } 
  </code></pre>
  <p>The codes in the ngOnInit</p>
  <pre><code>ngOnInit(){ this.positionFilter.valueChanges.subscribe(positionFilterValue =&gt; { this.dataSource.data = this.filterOptions(positionFilterValue, this.nameFilter.value); }); this.nameFilter.valueChanges.subscribe(nameFilterValue =&gt; { this.dataSource.data = this.filterOptions(this.positionFilter.value, nameFilterValue); }); }
  </code></pre>
  <p>These are the codes in the html</p>
  <pre><code>Create Date {{ position.createDate | json }} {{ element.createDate }}
  </code></pre>
  <p>They are displaying the values on the web page, but they are not filtering the table.</p>