mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Ensure that Page Size and Page are always integers
This commit is contained in:
parent
8ab2b2c1e3
commit
eaeb303c72
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
afterUpdate(() => {
|
afterUpdate(() => {
|
||||||
dispatch('update', {pageSize, page});
|
dispatch('update', {pageSize: parseInt(pageSize), page: parseInt(page)});
|
||||||
});
|
});
|
||||||
|
|
||||||
$: totalPages = Math.max(Math.ceil(totalItems / pageSize), 1);
|
$: totalPages = Math.max(Math.ceil(totalItems / pageSize), 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue