You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a paginated table scenario where row data are first loaded on page change, the actual total number of entries might be different from the length of the value property. This seems to be what totalRecords is for.
However, it doesn't seem to have any effect: pagination is only activated if the length of value is greater than the rows attribute, regardless of totalRecords. (The documentation mentions that it "defaults to length of value when not defined", which implies that it could be set to something else.)
Describe the bug
In a paginated table scenario where row data are first loaded on page change, the actual total number of entries might be different from the length of the
value
property. This seems to be whattotalRecords
is for.However, it doesn't seem to have any effect: pagination is only activated if the length of
value
is greater than therows
attribute, regardless oftotalRecords
. (The documentation mentions that it "defaults to length of value when not defined", which implies that it could be set to something else.)Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/github-rbpxrszq?file=src%2Fapp%2Fapp.component.html
Environment
primeng with angular in node in alpine in docker in arch in wsl2 in win10. (it doesn't matter but you asked.)
Angular version
19.1.3
PrimeNG version
v19
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Create a paginated p-table where
data.length <= rows < totalRecords
.Behavior: pagination is disabled (only page 1 is active).
Expected behavior
Can move to page 2 and up to page number
(totalRecords - 1)//rows + 1
.The text was updated successfully, but these errors were encountered: