summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_switch_modal.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-07-15 10:37:51 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-07-15 10:37:51 -0400
commit500b2dce10d396a53c11596d35ef63688ada0861 (patch)
treef00af325165a3cbdcf24f84218cb93c6c38733f1 /webapp/components/channel_switch_modal.jsx
parent47535ed0c7b8155fb7cdcb3cf226fb9cc57bc542 (diff)
downloadchat-500b2dce10d396a53c11596d35ef63688ada0861.tar.gz
chat-500b2dce10d396a53c11596d35ef63688ada0861.tar.bz2
chat-500b2dce10d396a53c11596d35ef63688ada0861.zip
Fixed input handlers used by Textbox and SuggestionBox components to properly update when typing quickly (#3598)
Diffstat (limited to 'webapp/components/channel_switch_modal.jsx')
-rw-r--r--webapp/components/channel_switch_modal.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/webapp/components/channel_switch_modal.jsx b/webapp/components/channel_switch_modal.jsx
index 9bb98d74d..18e0f9f59 100644
--- a/webapp/components/channel_switch_modal.jsx
+++ b/webapp/components/channel_switch_modal.jsx
@@ -21,7 +21,7 @@ export default class SwitchChannelModal extends React.Component {
constructor() {
super();
- this.onUserInput = this.onUserInput.bind(this);
+ this.onInput = this.onInput.bind(this);
this.onShow = this.onShow.bind(this);
this.onHide = this.onHide.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
@@ -57,8 +57,8 @@ export default class SwitchChannelModal extends React.Component {
this.props.onHide();
}
- onUserInput(message) {
- this.setState({text: message});
+ onInput(e) {
+ this.setState({text: e.target.value});
}
handleKeyDown(e) {
@@ -122,7 +122,7 @@ export default class SwitchChannelModal extends React.Component {
ref='search'
className='form-control focused'
type='input'
- onUserInput={this.onUserInput}
+ onInput={this.onInput}
value={this.state.text}
onKeyDown={this.handleKeyDown}
listComponent={SuggestionList}