I am using PrimeNG 4.x.x supporting Angular 4. I want to provide values dynamically to multiselect filter in DataTable column.
As shown below I am creating table columns dynamically from 'clientcolumnDefs' and now I want to provide values dynamically to multiselect filter Option .
<p-dataTable #clientTable [value]="clientrowData" selectionMode="single" [(selection)]="selectedClient" dataKey="id" [contextMenu]="cm">
<p-column *ngFor="let col of clientcolumnDefs" [field]="col.field" [header]="col.header" sortable="true" [filter]="true" filterMatchMode="in" [style]="{'overflow':'visible'}">
<ng-template pTemplate="filter" let-col>
<p-multiSelect [options]="dynamicaFilters" defaultLabel="All" (onChange)="dt.filter($event.value,col.field,col.filterMatchMode)" styleClass="ui-column-filter"></p-multiSelect>
</ng-template>
</p-column>
</p-dataTable>
How do i populate my dynamicFilters in typescript , so that it works for all the columns.
The filters should be of this type but the values will be dynamic for each column.