Skip to content

Commit

Permalink
fix(checkbox): forward on:focus, on:blur to Checkbox and `Inlin…
Browse files Browse the repository at this point in the history
…eCheckbox` (#1937)
  • Loading branch information
wickning1 committed Mar 16, 2024
1 parent 9132bf8 commit 6364b23
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions COMPONENT_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ None.
| mouseenter | forwarded | -- |
| mouseleave | forwarded | -- |
| change | forwarded | -- |
| focus | forwarded | -- |
| blur | forwarded | -- |

## `CheckboxSkeleton`
Expand Down
1 change: 1 addition & 0 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
1 change: 1 addition & 0 deletions src/Checkbox/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
}
}}"
on:change
on:focus
on:blur
/>
<label for="{id}" title="{title}" class:bx--checkbox-label="{true}">
Expand Down
2 changes: 2 additions & 0 deletions src/Checkbox/InlineCheckbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
{...$$restProps}
aria-checked="{indeterminate ? undefined : checked}"
on:change
on:focus
on:blur
/>
<label
for="{id}"
Expand Down
1 change: 1 addition & 0 deletions types/Checkbox/Checkbox.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {} }
Expand Down

0 comments on commit 6364b23

Please sign in to comment.