From a7781eca818d11dde42a9d201a94243fac4d5ed4 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 14 Jul 2026 12:12:05 +0000 Subject: [PATCH] fix(tags): header checkbox selects all loaded rows, not just the page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With a 7-row page size, the header "select all" (toggleAllPageRowsSelected) only selected the visible 7 — so it never reached "all loaded", the condition that reveals the "Select all N matching" escalation. It now selects every loaded row (toggleAllRowsSelected): - when everything matching is already loaded, that IS the whole set (tag via ids); - when more match than are loaded (e.g. 250 loaded of 10,000), the escalation appears and routes through mode:"filter" — the server resolves and tags the entire matching set (getFilteredPropertyIds, chunked), so memory is never the ceiling and no huge id list is sent from the client. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../[slug]/components/propertyTableColumns.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/portfolio/[slug]/components/propertyTableColumns.tsx b/src/app/portfolio/[slug]/components/propertyTableColumns.tsx index e8b8346c..9a0111de 100644 --- a/src/app/portfolio/[slug]/components/propertyTableColumns.tsx +++ b/src/app/portfolio/[slug]/components/propertyTableColumns.tsx @@ -215,17 +215,20 @@ const coreColumns: ColumnDef[] = [ id: "select", enableSorting: false, enableHiding: false, + // Selects ALL loaded rows (not just the paginated page), so on a small page + // size it still covers everything in view. When more properties match than + // are loaded, the TagActionBar offers "Select all N matching" on top of this. header: ({ table }) => ( table.toggleAllPageRowsSelected(!!v)} + onCheckedChange={(v) => table.toggleAllRowsSelected(!!v)} /> ), cell: ({ row }) => (