1

Someone know if is possible to add column filter (like in the image attached) on the angular material table? I already search on the official documentation and i don't find anything useful.

Thanks

enter image description here

DragusPatrick
  • 33
  • 1
  • 4
  • Does this answer your question? https://stackoverflow.com/q/49939979/5107490 – ShayD Feb 15 '23 at 16:17
  • 1
    Yes, you can add an input to each header Client name
    {{element.client_name}}
    Here is similar https://stackoverflow.com/questions/75449883/multiple-filters-on-mattable-angular/75453709#75453709
    – Nikita Feb 15 '23 at 19:55
  • thanks @NikitaBardakov, it works. Now i have another issue. Basically for all pages i use a generic material table (reusable component) and i'm trying to figure out on how to pass the filters for every column. To the generic table i pass the columns in an array like this [[ { "headerCode": "employee_id", "property": "id", "sortBy": "id", "textAlign": "left", "size": "200", "include": "", "pipe": "", "format": "", "bolded": true }]. Maybe is a good idea to pass the html filter from here? – DragusPatrick Feb 17 '23 at 08:20
  • It's dificult to recomend something not seeing the whole project. But you can look at the question https://stackoverflow.com/questions/75449883/multiple-filters-on-mattable-angular/75453709#75453709 . There JSON used for miltiple filters. I guess you can use just an Object. It depends from your needs I create a little SB example https://stackblitz.com/edit/angular-dqmyop?file=src/main.ts There is some bug, the table data doesn't appeared after loading, and is needed click to filter. This example just show a way – Nikita Feb 17 '23 at 21:21

0 Answers0