Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 16:02:49 +00:00
co-authored by renee-png
parent c15e4312a0
commit 41c3b7aa66
+5 -5
View File
@@ -208,12 +208,12 @@ function ContactsIndex() {
});
};
const toggleAllVisible = () => {
const visibleIds = filtered.map((r) => r.id);
const allSelected = visibleIds.every((id) => selected.has(id));
const ids = visibleRows.map((r) => r.id);
const allSelected = ids.every((id) => selected.has(id));
setSelected((s) => {
const next = new Set(s);
if (allSelected) visibleIds.forEach((id) => next.delete(id));
else visibleIds.forEach((id) => next.add(id));
if (allSelected) ids.forEach((id) => next.delete(id));
else ids.forEach((id) => next.add(id));
return next;
});
};
@@ -396,7 +396,7 @@ function ContactsIndex() {
aria-label="Select all visible"
/>
<span className="text-xs text-muted-foreground">
Select all {filtered.length} visible
Showing {visibleRows.length} of {filtered.length}
</span>
</div>
)}