0

I am using Angular Material in a project, do you know if it is possible to define manually a row inside a mat-table? The idea is to add a row containing only inputs to filter the columns directly in the database (not using the filtering options of mat-table).

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr> <!-- this new row -->
   <td><input ...></td>
   <td><input ...></td>
   ...
</tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>

Thanks for your responses.

kian
  • 1,449
  • 2
  • 13
  • 21
Robin J
  • 23
  • 4
  • 1
    Have you tried your code and it didn't work? Its seems reasonable to me at first glance. maybe also add the `map-row` directive too – Haris Bouchlis Sep 24 '21 at 14:45
  • 1
    Hello, thanks, yes I did try it with and without the directive. I think I don't have much choice, I will have to create a second `mat-header-row` with several ng-container for each columns. I didn't want to use it because we have a lot of columns to show. – Robin J Sep 27 '21 at 07:46

0 Answers0