diff --git a/src/app/(protected)/vendors/index.tsx b/src/app/(protected)/vendors/index.tsx
index 92b9112b..68abe1a0 100644
--- a/src/app/(protected)/vendors/index.tsx
+++ b/src/app/(protected)/vendors/index.tsx
@@ -416,8 +416,8 @@ export default function VendorsListPage() {
}}
>
- {rows.length} {isActive ? "active" : "inactive"}{" "}
- {rows.length === 1 ? "technician" : "technicians"}
+ {totalCount} {isActive ? "active" : "inactive"}{" "}
+ {totalCount === 1 ? "technician" : "technicians"}
{(appliedChips.length > 0 || debouncedSearch) && " · filtered"}
{` · ${activeCount} active · ${inactiveCount} inactive`}
diff --git a/src/test/app/(protected)/vendors/vendors-list.test.tsx b/src/test/app/(protected)/vendors/vendors-list.test.tsx
index 64785ad0..1db80de8 100644
--- a/src/test/app/(protected)/vendors/vendors-list.test.tsx
+++ b/src/test/app/(protected)/vendors/vendors-list.test.tsx
@@ -65,4 +65,22 @@ describe("VendorsListPage", () => {
expect(screen.getByText("Drain Cleaning Bros")).toBeInTheDocument();
expect(screen.queryByRole("button", { name: "Deactivate vendor" })).not.toBeInTheDocument();
});
+
+ it("reports the filtered totalCount in the footer when page rows are fewer than total", () => {
+ const pageVendors = Array.from({ length: 3 }, (_, index) => ({
+ ...activeVendor,
+ id: 100 + index,
+ companyName: `Vendor ${index + 1}`,
+ }));
+
+ useVendorsList.mockImplementation((params: { isActive?: boolean; pageSize?: number }) => {
+ if (params.pageSize === 1) return result([], params.isActive ? 25 : 0);
+ return result(pageVendors, 25);
+ });
+
+ renderWithProviders(, { route: "/vendors", withAuth: false });
+
+ expect(screen.getByText(/25 active technicians/)).toBeInTheDocument();
+ expect(screen.queryByText(/3 active technicians/)).not.toBeInTheDocument();
+ });
});