fix(checkbox): forward on:focus, on:blur to Checkbox and InlineCheckbox (#1937)

This commit is contained in:
Nick Wing 2024-03-16 11:31:30 -05:00 committed by GitHub
commit 6364b23030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 0 deletions

View file

@ -487,6 +487,7 @@ None.
| mouseenter | forwarded | -- |
| mouseleave | forwarded | -- |
| change | forwarded | -- |
| focus | forwarded | -- |
| blur | forwarded | -- |
## `CheckboxSkeleton`

View file

@ -926,6 +926,7 @@
"element": "CheckboxSkeleton"
},
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }
],
"typedefs": [],

View file

@ -112,6 +112,7 @@
}
}}"
on:change
on:focus
on:blur
/>
<label for="{id}" title="{title}" class:bx--checkbox-label="{true}">

View file

@ -29,6 +29,8 @@
{...$$restProps}
aria-checked="{indeterminate ? undefined : checked}"
on:change
on:focus
on:blur
/>
<label
for="{id}"

View file

@ -100,6 +100,7 @@ export default class Checkbox extends SvelteComponentTyped<
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
change: WindowEventMap["change"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{ labelText: {} }