I have a Data Table with two columns, each one having a filter input. Values are populating in rows as expected. The only problem lies with "director" filter. Fields are defined as:
this.moviecols = [
{ field: "name", header: 'NAME' },
{ field: "directorstatus", header: 'DIRECTOR STATUS' }
]
Response from Server:
{
director: {name: null, status: "Pro"}
name: "Star Wars"
}
I am able to filter movies with "name" column:
<input *ngIf="col.field != 'director'" pInputText type="text" (input)="table.filter($event.target.value, col.field, col.filterMatchMode)">
But for "director status" column, where I'm displaying the status field, following code is not working:
<input *ngIf="col.field == 'directorstatus'" pInputText type="text" (input)="table.filter($event.target.value, col.field['status'], col.filterMatchMode)">