Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f99fa3a

Browse files
author
Luke Barnard
committed
Fixed pressing space or clicking dd input closes dd
1 parent 90ee0c7 commit f99fa3a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/views/elements/Dropdown.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ export default class Dropdown extends React.Component {
152152
}
153153

154154
_onInputClick(ev) {
155-
this.setState({
156-
expanded: !this.state.expanded,
157-
});
158-
ev.preventDefault();
155+
if (!this.state.expanded) {
156+
this.setState({
157+
expanded: !this.state.expanded,
158+
});
159+
ev.preventDefault();
160+
}
159161
}
160162

161163
_onMenuOptionClick(dropdownKey) {

0 commit comments

Comments
 (0)