DataTable - Filter Filtering is enabled by setting the filter property as true in column object. Default match mode is "startsWith" and this can be configured using filterMatchMode property of column object that also accepts "contains" and "endsWith".
List of Cars

export class DataTableFilterDemo implements OnInit {

    cars: Car[];

    constructor(private carService: CarService) {}

    ngOnInit() {
        this.carService.getCarsMedium().then(cars => this.cars = cars);
    }
}


<p-dataTable [value]="cars" [rows]="10" [paginator]="true">
    <header>List of Cars</header>
    <p-column field="vin" header="Vin (startsWith)" [filter]="true"></p-column>
    <p-column field="year" header="Year (contains)" [filter]="true" filterMatchMode="contains"></p-column>
    <p-column field="brand" header="Brand (startsWith)" [filter]="true"></p-column>
    <p-column field="color" header="Color (endsWith)" [filter]="true" filterMatchMode="endsWith"></p-column>
</p-dataTable>