Angular 使用数组对象初始化过滤器
我想知道是否可以使用对象数组将某些内容过滤到表中 我用的是角度6和素数7 我的p表如下所示:Angular 使用数组对象初始化过滤器,angular,typescript,filter,primeng,primeng-turbotable,Angular,Typescript,Filter,Primeng,Primeng Turbotable,我想知道是否可以使用对象数组将某些内容过滤到表中 我用的是角度6和素数7 我的p表如下所示: <p-table #table class="ui-table ui-table-responsive" [value]="arrays" [columns]="cols" > ... <div class="col-xl-4"> <i class="fa fa-search" style="margin:4px 4px 0 0"&
<p-table #table class="ui-table ui-table-responsive" [value]="arrays" [columns]="cols" >
...
<div class="col-xl-4">
<i class="fa fa-search" style="margin:4px 4px 0 0"></i>
<input type="text" pInputText size="50" placeholder="Rechercher" (input)="table.filter($event.target.value, cols['sort'], 'contains')" style="width:auto">
</div>
...
<p-table>
目前我的筛选器不起作用。您没有传递col.field的列传递您的列
(input)="dt.filter($event.target.value, col.field, col.filterMatchMode)"
(input)="dt.filter($event.target.value, col.field, col.filterMatchMode)"