fix: made total reactive

This commit is contained in:
Arman committed 2023-03-22 16:32:49 +01:00
1 parent fd42323e8c
commit 71b0aca6d6
1 file changed
+2 -1
+2 -1
View File
@@ -3,9 +3,10 @@
export let items = [];
export let limit = 5;
let total = items?.length;
let offset = 0;
$: total = items?.length;
$: paginatedItems = items.slice(offset, offset + limit);
</script>