mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat!: dispatch "change" event in Pagination
, rename "change" to "update" in Select
(#1497)
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`
This commit is contained in:
parent
724d90bd7b
commit
9198ed5474
9 changed files with 76 additions and 23 deletions
4
types/Pagination/Pagination.svelte.d.ts
vendored
4
types/Pagination/Pagination.svelte.d.ts
vendored
|
@ -103,9 +103,11 @@ export interface PaginationProps
|
|||
export default class Pagination extends SvelteComponentTyped<
|
||||
PaginationProps,
|
||||
{
|
||||
update: CustomEvent<{ pageSize: number; page: number }>;
|
||||
/** Dispatched after any user interaction */
|
||||
change: CustomEvent<{ page?: number; pageSize?: number }>;
|
||||
["click:button--previous"]: CustomEvent<{ page: number }>;
|
||||
["click:button--next"]: CustomEvent<{ page: number }>;
|
||||
update: CustomEvent<{ pageSize: number; page: number }>;
|
||||
},
|
||||
{}
|
||||
> {}
|
||||
|
|
3
types/Select/Select.svelte.d.ts
vendored
3
types/Select/Select.svelte.d.ts
vendored
|
@ -109,7 +109,8 @@ export interface SelectProps
|
|||
export default class Select extends SvelteComponentTyped<
|
||||
SelectProps,
|
||||
{
|
||||
change: CustomEvent<string | number>;
|
||||
/** The selected value. */ update: CustomEvent<string | number>;
|
||||
change: WindowEventMap["change"];
|
||||
input: WindowEventMap["input"];
|
||||
focus: WindowEventMap["focus"];
|
||||
blur: WindowEventMap["blur"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue