Skip to content

Commit 12670b5

Browse files
authored
Merge pull request #2249 from Akshat55/toggle-enter
fix: Allow 'enter' key to toggle switch state
2 parents 211d84d + 6923c1c commit 12670b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/toggle/toggle.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export class ToggleChange {
7575
[attr.aria-labelledby]="ariaLabelledby"
7676
[attr.aria-checked]="checked"
7777
(change)="onChange($event)"
78-
(click)="onClick($event)">
78+
(click)="onClick($event)"
79+
(keyup.enter)="onClick($event)">
7980
<label
8081
class="bx--toggle-input__label"
8182
[for]="id"

0 commit comments

Comments
 (0)