summaryrefslogtreecommitdiffstats
path: root/web/react/components/suggestion/suggestion_box.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-03-14 10:23:51 -0700
committer=Corey Hulen <corey@hulen.com>2016-03-14 10:23:51 -0700
commitea3f25924ea64a2dd1e73624c0d30824e1efb240 (patch)
treea4a2b2bdc37bd675fb89837713995ad44a27427b /web/react/components/suggestion/suggestion_box.jsx
parent397ebec88c2db3569efd77238bf877e976492d34 (diff)
parentbf7ae0711743926cfbb031675cc3320d7a942465 (diff)
downloadchat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.tar.gz
chat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.tar.bz2
chat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.zip
Merge branch 'master' into PLT-2115
Diffstat (limited to 'web/react/components/suggestion/suggestion_box.jsx')
-rw-r--r--web/react/components/suggestion/suggestion_box.jsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/react/components/suggestion/suggestion_box.jsx b/web/react/components/suggestion/suggestion_box.jsx
index ea9f835eb..12b098cbd 100644
--- a/web/react/components/suggestion/suggestion_box.jsx
+++ b/web/react/components/suggestion/suggestion_box.jsx
@@ -2,7 +2,7 @@
// See License.txt for license information.
import Constants from '../../utils/constants.jsx';
-import * as EventHelpers from '../../dispatcher/event_helpers.jsx';
+import * as GlobalActions from '../../action_creators/global_actions.jsx';
import SuggestionStore from '../../stores/suggestion_store.jsx';
import * as Utils from '../../utils/utils.jsx';
@@ -48,7 +48,7 @@ export default class SuggestionBox extends React.Component {
if (!(container.is(e.target) || container.has(e.target).length > 0)) {
// we can't just use blur for this because it fires and hides the children before
// their click handlers can be called
- EventHelpers.emitClearSuggestions(this.suggestionId);
+ GlobalActions.emitClearSuggestions(this.suggestionId);
}
}
@@ -57,7 +57,7 @@ export default class SuggestionBox extends React.Component {
const caret = Utils.getCaretPosition(textbox);
const pretext = textbox.value.substring(0, caret);
- EventHelpers.emitSuggestionPretextChanged(this.suggestionId, pretext);
+ GlobalActions.emitSuggestionPretextChanged(this.suggestionId, pretext);
if (this.props.onUserInput) {
this.props.onUserInput(textbox.value);
@@ -89,13 +89,13 @@ export default class SuggestionBox extends React.Component {
handleKeyDown(e) {
if (SuggestionStore.hasSuggestions(this.suggestionId)) {
if (e.which === KeyCodes.UP) {
- EventHelpers.emitSelectPreviousSuggestion(this.suggestionId);
+ GlobalActions.emitSelectPreviousSuggestion(this.suggestionId);
e.preventDefault();
} else if (e.which === KeyCodes.DOWN) {
- EventHelpers.emitSelectNextSuggestion(this.suggestionId);
+ GlobalActions.emitSelectNextSuggestion(this.suggestionId);
e.preventDefault();
} else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB) {
- EventHelpers.emitCompleteWordSuggestion(this.suggestionId);
+ GlobalActions.emitCompleteWordSuggestion(this.suggestionId);
e.preventDefault();
} else if (this.props.onKeyDown) {
this.props.onKeyDown(e);