Primgng TABLE, not able to iterate over filter object keys on lazy load #3443
Unanswered
adelsl2004
asked this question in
PrimeNG
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this angular 17 project
Table:
<p-table #usersdt [value]="users" [(selection)]="selectedusers" dataKey="id" [scrollable]="true" scrollHeight="flex" [rowHover]="true" [loading]="loading" [showLoader]="false" [paginator]="false" lazy="true" styleClass="p-datatable-gridlines" (onLazyLoad)="loadTableLazy($event,usersdt)" (onHeaderCheckboxToggle)="headerCheckboxToggle($event)" (onRowSelect)="rowSelect($event)" (onRowUnselect)="rowunSelect($event)" (onFilter)="tableFIlter($event)" >
onLazyLoad event :
loadTableLazy(event: LazyLoadEvent, usersdt) {
console.log(event.filters);
const keys = Object.keys(event.filters);
for (const key of keys) {
console.log(
Clave: ${key }, Valor: ${event.filters[key]}
);}
setTimeout(() => {
this.getPage(this.filter, this.order);
}, Math.random() * 1000 + 250);
}
Object.Keys returns an empty array, I've tried Object.entries, same result....
Beta Was this translation helpful? Give feedback.
All reactions