fix(contacts): fetch the requested page on pagination change #134

Merged
David merged 1 commit from fix/mapps-148-pagination-fetch-next-page into main 2026-06-14 15:56:10 +02:00
Owner

The Companies and Contacts list views computed page/filter/sort snapshots in the component body and captured them by value into the use_resource closure. Dioxus use_resource only restarts when a signal read inside the closure changes, so the resource never subscribed to the page signal: clicking a page number advanced the "Showing X to Y" footer (rendered from the current_page prop) but fired no request, leaving the stale page-1 rows on screen.

Read the page, search, filter, and sort signals inside the resource closure so the resource subscribes to them and re-fetches the requested page, binding the returned rows. active_tenant_generation is still read so an org switch / token swap continues to re-fetch.

#MAPPS-148

The Companies and Contacts list views computed page/filter/sort snapshots in the component body and captured them by value into the `use_resource` closure. Dioxus `use_resource` only restarts when a signal read inside the closure changes, so the resource never subscribed to the `page` signal: clicking a page number advanced the "Showing X to Y" footer (rendered from the `current_page` prop) but fired no request, leaving the stale page-1 rows on screen. Read the `page`, search, filter, and sort signals inside the resource closure so the resource subscribes to them and re-fetches the requested page, binding the returned rows. `active_tenant_generation` is still read so an org switch / token swap continues to re-fetch. #MAPPS-148
fix(contacts): fetch the requested page on pagination change
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 50s
Create release / Create release from merged PR (pull_request) Has been skipped
7162edbbe8
The Companies and Contacts list views computed page/filter/sort snapshots in the component body and captured them by value into the `use_resource` closure. Dioxus `use_resource` only restarts when a signal read inside the closure changes, so the resource never subscribed to the `page` signal: clicking a page number advanced the "Showing X to Y" footer (rendered from the `current_page` prop) but fired no request, leaving the stale page-1 rows on screen.

Read the `page`, search, filter, and sort signals inside the resource closure so the resource subscribes to them and re-fetches the requested page, binding the returned rows. `active_tenant_generation` is still read so an org switch / token swap continues to re-fetch.

#MAPPS-148
David merged commit c1bf5afaca into main 2026-06-14 15:56:10 +02:00
David deleted branch fix/mapps-148-pagination-fetch-next-page 2026-06-14 15:56:10 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!134
No description provided.