Only join a room when enter is hit when the join button is shown

pull/21833/head
Luke Barnard 2017-03-28 13:02:13 +01:00
parent 91d10646b5
commit 98a0b804c7
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ export default class DirectorySearchBox extends React.Component {
}
_onKeyUp(ev) {
if (ev.key == 'Enter') {
if (ev.key == 'Enter' && this.props.showJoinButton) {
if (this.props.onJoinClick) {
this.props.onJoinClick(this.state.value);
}