-
-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to navigate to the first page
- Loading branch information
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
src/Exceptionless.Web/ClientApp/src/lib/components/table/Pager.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
<script lang="ts"> | ||
import FirstPageIcon from '~icons/mdi/first-page'; | ||
import NavigateBeforeIcon from '~icons/mdi/navigate-before'; | ||
import NavigateNextIcon from '~icons/mdi/navigate-next'; | ||
import { createEventDispatcher } from 'svelte'; | ||
export let canNavigateToFirstPage: boolean; | ||
export let hasPrevious: boolean; | ||
export let hasNext: boolean; | ||
const dispatch = createEventDispatcher(); | ||
</script> | ||
|
||
<div class="join"> | ||
{#if canNavigateToFirstPage} | ||
<button | ||
class="btn btn-square btn-outline join-item btn-sm" | ||
on:click|preventDefault={() => dispatch('navigatetofirstpage')}><FirstPageIcon /></button | ||
> | ||
{/if} | ||
<button | ||
class="btn btn-square btn-outline join-item btn-sm" | ||
disabled={!hasPrevious} | ||
on:click|preventDefault={() => dispatch('previous')}><</button | ||
on:click|preventDefault={() => dispatch('previous')}><NavigateBeforeIcon /></button | ||
> | ||
<button | ||
class="btn btn-square btn-outline join-item btn-sm" | ||
disabled={!hasNext} | ||
on:click|preventDefault={() => dispatch('next')}>></button | ||
on:click|preventDefault={() => dispatch('next')}><NavigateNextIcon /></button | ||
> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters