Base solution for your next web application
Open Closed

Primeng turbo table local storage #8786


User avatar
0
lighthousehq created

We are trying to get the stateStorage and stateKey which are primeng tables but this is not working for us at all.

We have followed the guidelines outlined here - https://primefaces.org/primeng/showcase/#/table/state. This example works as you can see the keys written to the storage.

Please help as we need to keep this and other proporties of the grid (e.g. number of rows) in user personalisation.

<p-table #dataTable [value]="primengTableHelper.records" rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [columns]="cols" [lazy]="true" [scrollable]="false" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive" [resizableColumns]="false" columnResizeMode="fit" stateStorage="local" stateKey="datatable-local">

This is the code for maintaining local storage for a primeng table. The instructions are followed as per the documentation provided by primeNG (https://www.primefaces.org/primeng/#/table/state). But the state is not saved as expected. Can anyone mention why the state is not stored as expected. It gets reset when routed back or reset.

Any help appreciated


1 Answer(s)