mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Closes #1491 * feat(pagination): dispatch "change" event when interacting with previous/next buttons, page/page size dropdowns * breaking(select): rename dispatched "change" event to "update" * breaking(select): forward `change` event to `Select`
24 lines
605 B
Svelte
24 lines
605 B
Svelte
<script lang="ts">
|
|
import { Pagination, PaginationSkeleton } from "../types";
|
|
</script>
|
|
|
|
<Pagination
|
|
totalItems="{102}"
|
|
pageSizes="{[10, 15, 20]}"
|
|
on:change="{(e) => {
|
|
console.log(e.detail); // { pageSize?: number, page?: number }
|
|
}}"
|
|
on:update="{(e) => {
|
|
console.log(e.detail); // { pageSize: number; page: number; }
|
|
}}"
|
|
/>
|
|
|
|
<Pagination totalItems="{102}" page="{4}" />
|
|
|
|
<Pagination totalItems="{102}" pageSizes="{[16, 36, 99]}" pageSize="{36}" />
|
|
|
|
<Pagination totalItems="{102}" pageInputDisabled />
|
|
|
|
<Pagination totalItems="{102}" pageSizeInputDisabled />
|
|
|
|
<PaginationSkeleton />
|