fix(pagination): on:change dispatches with correct value (#2194)

This commit is contained in:
Eric Liu 2025-09-05 09:00:51 -07:00 committed by GitHub
commit 44a6cc0dfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 8 deletions

View file

@ -135,8 +135,8 @@
hideLabel
noLabel
inline
on:change={() => {
dispatch("change", { pageSize });
on:update={(event) => {
dispatch("change", { pageSize: event.detail });
}}
bind:selected={pageSize}
>
@ -165,8 +165,8 @@
labelText="Page number, of {totalPages} pages"
inline
hideLabel
on:change={() => {
dispatch("change", { page });
on:update={(event) => {
dispatch("change", { page: event.detail });
}}
bind:selected={page}
>