0

I am developing an Angular6 application with angular material. Now facing a problem with filter data from mat-table result using multiple values.

I didn't get any value in the table after filter from form group.

Is this correct way what I am working? If not please help me out the issue.

Please refer the screenshot and find the link stackblitz project for the actual view,

enter image description here

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63
imjayabal
  • 805
  • 1
  • 12
  • 24

1 Answers1

0

I have never really used this and I don't know if the following implementation is correct. It can be improved by a big margin I believe.

StackBlitz

Basically, from what I understand,m by default the behavior when you put a filter is to check if this value exist in the data.

But in your case, you want to check over various column, and do a "multiple" filter.

you need to provide you own filterPredicate function, and handle your filter in there

Crocsx
  • 2,534
  • 1
  • 28
  • 50
  • You almost there, But there is a small issue the name and email fields if we type "name" or "email" result is not showing. It will show the character includes the result. ex: If we type "nam" all the data will be shown in the name field includes the charactor – imjayabal Mar 20 '19 at 06:07