If I have an input field to do the filtering, how does the input field determine which field to filter on?
Example (added a random field called name to the example in the documentation):
Code: Select all
<p-dataView #dv [value]="cars" filterBy="brand, name">
<p-header>
<input type="search" pInputText placeholder="Search" (keyup)="dv.filter($event.target.value)">
// With this current set up I'm guessing it always filters by Brand because that's the first filterBy string
// Can I set this up as a global filter?
// If global filter is not possible, I'm guessing I'm missing something to help indicate that this filter should filter on, for example, name.
</p-header>
<ng-template let-car pTemplate="listItem">
{{car.id}}
</ng-template>
</p-dataView>