Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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