Fixed pressing space or clicking dd input closes dd

This commit is contained in:
Luke Barnard 2017-05-18 16:58:57 +01:00
parent 90ee0c7ad9
commit f99fa3ac1a

View file

@ -152,11 +152,13 @@ export default class Dropdown extends React.Component {
} }
_onInputClick(ev) { _onInputClick(ev) {
if (!this.state.expanded) {
this.setState({ this.setState({
expanded: !this.state.expanded, expanded: !this.state.expanded,
}); });
ev.preventDefault(); ev.preventDefault();
} }
}
_onMenuOptionClick(dropdownKey) { _onMenuOptionClick(dropdownKey) {
this.setState({ this.setState({