Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
blerrgh committed Jan 10, 2023
1 parent 4387606 commit e6b2a7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/plugins/addPagination.ts
Expand Up @@ -33,7 +33,7 @@ export const createPageStore = ({
});
};
const setPageSize = (newPageSize: number) => updatePageSize(() => newPageSize);

const pageIndex = writable(initialPageIndex);

let pageCount;
Expand All @@ -50,10 +50,10 @@ export const createPageStore = ({

const serverItemsCount = writable(0);
if (serverSide) {
pageCount = derived([pageSize, serverItemsCount], calcPageCount)
pageCount = derived([pageSize, serverItemsCount], calcPageCount);
} else {
const itemCount = derived(items, ($items) => $items.length)
pageCount = derived([pageSize, itemCount], calcPageCount)
const itemCount = derived(items, ($items) => $items.length);
pageCount = derived([pageSize, itemCount], calcPageCount);
}

const hasPreviousPage = derived(pageIndex, ($pageIndex) => {
Expand Down

0 comments on commit e6b2a7c

Please sign in to comment.