Primeng virtualscroll offset like peagination

Discussão em 'Angular' iniciado por user13505963, Fevereiro 20, 2025.

  1. user13505963

    user13505963 Guest

    im using primeng table..

    I have this onLazyLoad function

    this.apiService.getUsers(this.searchQuery,event.sortField,event.sortOrder===-1? "desc" : "asc",****** PAGE ******).subscribe(
    res=>{
    if(res){
    this.users=res.data.concat(this.users );
    }
    }


    then

    p-table [value]="users" (onLazyLoad)="onLazyLoad($event)" [rows]="20" [resetPageOnSort]="true" [resizableColumns]="true" [scrollHeight]="'calc(100vh - 210px)'" [virtualScroll]="true" [virtualRowHeight]="40" [lazy]="true">


    Is it possible to get current scrolled page to use on BE for pagination? Or i have to change backend to work with event.first and event.rows

    Continue reading...

Compartilhe esta Página