1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-13 08:02:38 +03:00

Merge pull request #776 from matrix-org/luke/fix-directory-search-enter

Only join a room when enter is hit if the join button is shown
This commit is contained in:
David Baker
2017-03-30 09:59:42 +01:00
committed by GitHub

View File

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