简体   繁体   中英

Angular6 Material table multiple filter not working

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,

在此输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM