We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 229bc8d commit b7bea62Copy full SHA for b7bea62
src/lib/plugins/addPagination.ts
@@ -36,7 +36,6 @@ export const createPageStore = ({
36
37
const pageIndex = writable(initialPageIndex);
38
39
- let pageCount;
40
function calcPageCount([$pageSize, $itemsCount]: [$pageSize: number, $itemsCount: number]) {
41
const $pageCount = Math.ceil($itemsCount / $pageSize);
42
pageIndex.update(($pageIndex) => {
@@ -49,6 +48,7 @@ export const createPageStore = ({
49
48
}
50
51
const serverItemsCount = writable(0);
+ let pageCount;
52
if (serverSide) {
53
pageCount = derived([pageSize, serverItemsCount], calcPageCount);
54
} else {
0 commit comments