<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">
You can do this by configuring the PrimeNgConfig: in your i18n assets (could also be just a typescript constant): "primeng": { ... "dateFormat": "dd.
Save this question. Show activity on this post. cols = [ { field: 'name', header: 'Name', sort: true }, { field: 'age', header: 'Age', sort: true }, { field: 'gender', header: 'Gender', sort: false }, { field: 'status', header: 'Status', sort: false } ];
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With