diff --git a/src/lib/ListPagination.svelte b/src/lib/ListPagination.svelte index dcac8f36..d20fdf37 100644 --- a/src/lib/ListPagination.svelte +++ b/src/lib/ListPagination.svelte @@ -8,7 +8,7 @@ export let pageAmount: number; {#if currentPage !== 1} - currentPage -= 1}> + {e.preventDefault(); currentPage -= 1}}> {:else} @@ -17,12 +17,12 @@ export let pageAmount: number; {/if} {#if currentPage > 2} - currentPage = 1}>1 + {e.preventDefault(); currentPage = 1}}>1 {/if} {#if currentPage === 4} - currentPage = 2}>2 + {e.preventDefault(); currentPage = 2}}>2 {/if} {#if currentPage > 4} @@ -32,7 +32,7 @@ export let pageAmount: number; {/if} {#if currentPage > 1} - currentPage -= 1}>{currentPage - 1} + {e.preventDefault(); currentPage -= 1}}>{currentPage - 1} {/if} @@ -40,7 +40,7 @@ export let pageAmount: number; {#if currentPage < pageAmount} - currentPage += 1}>{currentPage + 1} + {e.preventDefault(); currentPage += 1}}>{currentPage + 1} {/if} {#if currentPage < pageAmount - 3} @@ -50,21 +50,22 @@ export let pageAmount: number; {/if} {#if currentPage === pageAmount - 3} - currentPage = pageAmount - 1}>{pageAmount - 1} + {e.preventDefault(); currentPage = pageAmount - 1}}>{pageAmount - 1} {/if} {#if currentPage < pageAmount - 1} - currentPage = pageAmount}>{pageAmount} + { e.preventDefault(); currentPage = pageAmount}}>{pageAmount} {/if} {#if currentPage !== pageAmount} - currentPage += 1}> + {e.preventDefault(); currentPage += 1}}> {:else} {/if} - \ No newline at end of file + +{/if} \ No newline at end of file