mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
fix(toggle): forward change
, keyup
events after toggled
updates (#1559)
Fixes #1556
This commit is contained in:
parent
75a69bbfc2
commit
e7fe8ca85b
1 changed files with 2 additions and 2 deletions
|
@ -60,17 +60,17 @@
|
|||
class:bx--toggle-input="{true}"
|
||||
class:bx--toggle-input--small="{size === 'sm'}"
|
||||
checked="{toggled}"
|
||||
on:change
|
||||
on:change="{() => {
|
||||
toggled = !toggled;
|
||||
}}"
|
||||
on:keyup
|
||||
on:change
|
||||
on:keyup="{(e) => {
|
||||
if (e.key === ' ' || e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
toggled = !toggled;
|
||||
}
|
||||
}}"
|
||||
on:keyup
|
||||
on:focus
|
||||
on:blur
|
||||
disabled="{disabled}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue