Skip to content

Commit c3d0f1e

Browse files
Fix row count being capped to page size
1 parent eceb07d commit c3d0f1e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lib/components/days/2023/Day3.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
const MAX_WEIGHT = 100;
1616
1717
// Day 3
18-
let selectedPresents: Awaited<typeof presents> = $state([]);
18+
let selectedPresents = $state<Awaited<typeof presents>>([]);
1919
let sleighWeight = $derived(
2020
Math.round(
2121
(selectedPresents.reduce((acc, present) => acc + present.weight, 0) + Number.EPSILON) * 100

src/routes/2023/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
santa: "Santa's",
2121
elves: "Elves"
2222
} as const;
23-
let currentDashboard: keyof typeof dashboards = $state("santa");
23+
let currentDashboard = $state<keyof typeof dashboards>("santa");
2424
</script>
2525

2626
<div class="container my-8">

src/routes/2023/productivity-dashboard/DataTable.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
<div class="flex items-center justify-end space-x-2 py-4">
230230
<div class="flex-1 text-sm text-muted-foreground">
231231
{#if table.getColumn("elf")?.getFilterValue()}
232-
<strong>{table.getPaginationRowModel().rows.length}</strong> out of
232+
<strong>{table.getFilteredRowModel().rows.length}</strong> out of
233233
<strong>{tableData.length}</strong> rows
234234
{:else}
235235
<strong>{table.getRowCount()}</strong> rows

0 commit comments

Comments
 (0)