просто используйте функцию типа
customFiltered() {
return (data, filter) => {
if (this.name && this.symbol)
return data.name == this.name && data.symbol == this.symbol
if (this.name)
return data.name == this.name
if (this.symbol)
return data.symbol == this.symbol
return true
}
}
Тогда вам нужно только
this.dataSource.filterPredicate =this.customFiltered();
где ваша переменная this.name и this.symbol являются [(ngModel)] вашего выбора
Вы можете увидеть в stackblitz