1

I'm trying to set the default value for primeNg table column and it's not working, below is my code, appreciate your help on this.

I have tried to add filter and set default value with filterValue="#{this.defaultFilterValue}"

<p-dataTable id="empTable" [lazy]="false" [(value)]="CSETEmps" [editable]="true" editMode="row" [responsive]="true"
    [resizableColumns]="false" [style]="{'margin-top':'5px'}" [tableStyle]="{'table-layout':'auto'}" [rows]="30"
    [paginator]="true" [pageLinks]="3" [rowsPerPageOptions]="[30,60,90]" var="data" (onclick)="onTableClick($event)"
    (onchange)="onTableChange($event)" #dt>

I expect the filter default value has to be set as 'Active' but it's not

TheParam
  • 10,113
  • 4
  • 40
  • 51
Jeeva
  • 11
  • 1
  • 2
  • are you using dropdown or search filter on column? – TheParam Apr 09 '19 at 12:03
  • You should elevorate a little more and put an example in stackblitz. `p-dataTable` doesn't have a property called `filterValue`. Another note is that `p-dataTable` is depecrated and you should use `p-table` instead. For the information in the filters of `p-dataTable` you have the examples in the primeng webpage: https://www.primefaces.org/primeng/#/datatable/filter – Daniel Piñeiro Apr 09 '19 at 12:55

0 Answers0