mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 20:09:35 +00:00
feat(pagination): dispatch button click events to be consistent with PaginationNav
This commit is contained in:
parent
a3a4a02d94
commit
32effacb76
4 changed files with 24 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
|||
<script>
|
||||
/**
|
||||
* @event {{ pageSize: number; page: number; }} update
|
||||
* @event {{ page: number; }} click:button--previous
|
||||
* @event {{ page: number; }} click:button--next
|
||||
*/
|
||||
|
||||
/** Specify the current page index */
|
||||
|
@ -162,6 +164,7 @@
|
|||
: ''}"
|
||||
on:click="{() => {
|
||||
page--;
|
||||
dispatch('click:button--previous', { page });
|
||||
}}"
|
||||
/>
|
||||
<Button
|
||||
|
@ -177,6 +180,7 @@
|
|||
: ''}"
|
||||
on:click="{() => {
|
||||
page++;
|
||||
dispatch('click:button--next', { page });
|
||||
}}"
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue