summaryrefslogtreecommitdiffstats
path: root/web/react/dispatcher
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/dispatcher')
-rw-r--r--web/react/dispatcher/event_helpers.jsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 856eec2f1..47d6b150e 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -111,3 +111,33 @@ export function showRegisterAppModal() {
value: true
});
}
+
+export function emitSuggestionPretextChanged(suggestionId, pretext) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_PRETEXT_CHANGED,
+ id: suggestionId,
+ pretext
+ });
+}
+
+export function emitSelectNextSuggestion(suggestionId) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_SELECT_NEXT,
+ id: suggestionId
+ });
+}
+
+export function emitSelectPreviousSuggestion(suggestionId) {
+ AppDispatcher.handleViewAction({
+ type: ActionTypes.SUGGESTION_SELECT_PREVIOUS,
+ id: suggestionId
+ });
+}
+
+export function emitCompleteWordSuggestion(suggestionId, term = '') {
+ AppDispatcher.handleViewAction({
+ type: Constants.ActionTypes.SUGGESTION_COMPLETE_WORD,
+ id: suggestionId,
+ term
+ });
+}