5
votes

<p-table #dt [scrollable]="true" scrollHeight="232px" [columns]="cols" [value]="packageList" selectionMode="single" [responsive]="true" [paginator]="false" [rows]="noOfRow" sortField="id" sortOrder="-1" [lazy]="true" (onLazyLoad)="loadPackageList($event)" [totalRecords]="totalRecords">

I have entered code here to use this much attribute. I need to use global filter but it is not working. <input type="text" pInputText size="50" placeholder="Global Filter" (input)="dt.filterGlobal($event.target.value, 'contains')" style="width:auto">

1

1 Answers

11
votes

After some code testing, I found an issue, that I have used lazy attribute. [lazy]="true" because of filterGlobal is not working. I did conditionally true /false to lazy parameter. when lazy="false" then only filterGlobal is working like a charm.