Problem Statement
In the Edit Content view, when a relationship field has enough related items to trigger pagination (e.g., more than 6), the pagination controls appear correctly showing "1 of 2". However, clicking next/previous page does not change the displayed items — the same items are always shown regardless of the selected page. Adding more items also keeps showing everything on page 1.
Root Cause Analysis:
The p-table in dot-relationship-field.component.html has [paginator]="false". When PrimeNG's paginator is disabled, it ignores [first] and [rows] and renders all items. The store correctly updates offset and currentPage, but the template binds [value]="data" (the full array) without slicing it to the current page.
Files involved:
core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-relationship-field/dot-relationship-field.component.html
core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.ts
Steps to Reproduce
- Open Edit Content for a content type that has a relationship field
- Add more than 6 related items to the relationship field
- Observe pagination appears showing "1 of 2"
- Click the next page button
- The same items remain displayed — no change
Acceptance Criteria
Suggested Fix
Add a paginatedData computed signal to RelationshipFieldStore that slices data based on offset and rowsPerPage, and use it in the template's [value] binding instead of the full data array.
dotCMS Version
Latest from main branch
Severity
Medium - Some functionality impacted
Links
NA
Problem Statement
In the Edit Content view, when a relationship field has enough related items to trigger pagination (e.g., more than 6), the pagination controls appear correctly showing "1 of 2". However, clicking next/previous page does not change the displayed items — the same items are always shown regardless of the selected page. Adding more items also keeps showing everything on page 1.
Root Cause Analysis:
The
p-tableindot-relationship-field.component.htmlhas[paginator]="false". When PrimeNG's paginator is disabled, it ignores[first]and[rows]and renders all items. The store correctly updatesoffsetandcurrentPage, but the template binds[value]="data"(the full array) without slicing it to the current page.Files involved:
core-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/components/dot-relationship-field/dot-relationship-field.component.htmlcore-web/libs/edit-content/src/lib/fields/dot-edit-content-relationship-field/store/relationship-field.store.tsSteps to Reproduce
Acceptance Criteria
rowsPerPage(currently 6)Suggested Fix
Add a
paginatedDatacomputed signal toRelationshipFieldStorethat slicesdatabased onoffsetandrowsPerPage, and use it in the template's[value]binding instead of the fulldataarray.dotCMS Version
Latest from main branch
Severity
Medium - Some functionality impacted
Links
NA