We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28755db commit 5364c25Copy full SHA for 5364c25
src/Select.jsx
@@ -67,8 +67,18 @@ class Select extends Component {
67
: () => {
68
this.onSelect(item.value);
69
};
70
+ const onKeyDown = e => e.keyCode === 13 && onClick();
71
+
72
return (
- <li role="button" onClick={onClick} className={cls} key={index} disabled={item.disabled}>
73
+ <li
74
+ role="button"
75
+ onClick={onClick}
76
+ className={cls}
77
+ key={index}
78
+ disabled={item.disabled}
79
+ tabIndex="0"
80
+ onKeyDown={onKeyDown}
81
+ >
82
{item.value}
83
</li>
84
);
0 commit comments