We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de53657 commit e988cd0Copy full SHA for e988cd0
frontend/src/components/Pagination.svelte
@@ -23,7 +23,7 @@
23
itemName = 'items',
24
}: Props = $props();
25
26
- const start = $derived((currentPage - 1) * pageSize + 1);
+ const start = $derived(Math.min((currentPage - 1) * pageSize + 1, totalItems));
27
const end = $derived(Math.min(currentPage * pageSize, totalItems));
28
</script>
29
0 commit comments