简体   繁体   中英

Primeng turbo table paging all selection

My customer has asked that I add an option to a grid we are using the turbo table for to show all rows on a single page. I cannot find any way that this is built into the library. Does anybody know how to do this? It seams like too common a need for it to not be in there. I could count the records and set the total count within the rowsPerPageOptions, but that sounds like way more of a hack than what should be there and would easily confuse my user base unfortunately.

You can initialize rows property with the length of the data array where you have the data.

Stackblitz

HTML:

<p-table [columns]="cols" [value]="myData" [paginator]="true" [rows]="myData.length">
   ....
</p-table>

TS:

export class ComponentClass{
    myData: any = [];  // data for the table
}

Also refer to the documentation, Properties section: PrimeNG Turbo Table

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM