Last active
May 14, 2018 15:44
-
-
Save AhmedHamedTN/378a2b23a57c70be196b7ca0cd0c713f to your computer and use it in GitHub Desktop.
PrimeNG p-dropdown with options as filter example inside p-datatable (make it work)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p-dataTable [value]="cars" [rows]="10" [paginator]="true" [globalFilter]="gb" #dt> | |
<p-header>List of Cars</p-header> | |
<p-column field="vin" header="Vin (startsWith)" [filter]="true" filterPlaceholder="Search"></p-column> | |
<p-column field="brand" header="Brand (Custom)" [filter]="true" filterMatchMode="equals"> | |
<ng-template pTemplate="filter" let-col> | |
<p-dropdown [options]="brands" appendTo="body" [style]="{'width':'100%'}" (onChange)="dt.filter($event.value,col.field,col.filterMatchMode)" styleClass="ui-column-filter"></p-dropdown> | |
</ng-template> | |
</p-column> | |
</p-dataTable> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment