Skip to content

Fix patient table pagination mismatch between API query and UI state#126

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-issue-122
Draft

Fix patient table pagination mismatch between API query and UI state#126
Copilot wants to merge 2 commits intomainfrom
copilot/fix-issue-122

Conversation

Copy link

Copilot AI commented Feb 13, 2026

Patient table displayed only 10 rows regardless of pagination state. API query pageSize was hardcoded to 10, but table state (persisted in localStorage from removed UI controls) could specify different values.

Changes

  • PatientList.tsx: Use pagination.pageSize from table state instead of TABLE_PAGE_SIZE constant when calling usePatientsPaginated
  • Remove unused TABLE_PAGE_SIZE import
- import { TABLE_PAGE_SIZE } from '@/utils/tableConfig'

  const { data: patientsData, refetch, totalCount, loading: patientsLoading } = usePatientsPaginated(
    {
      locationId: locationId || undefined,
      rootLocationIds: !locationId && effectiveRootLocationIds && effectiveRootLocationIds.length > 0 ? effectiveRootLocationIds : undefined,
      states: patientStates,
      search: searchInput,
    },
-   { pageSize: TABLE_PAGE_SIZE }
+   { pageSize: pagination.pageSize }
  )

Synchronizes API fetch size with table's controlled pagination state.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: felixevers <13922835+felixevers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue #122 Fix patient table pagination mismatch between API query and UI state Feb 13, 2026
Copilot AI requested a review from felixevers February 13, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants