From 07f0df6af428a56a4abedde841a0813e2802cd2b Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 2 Dec 2015 09:21:58 -0500 Subject: Moved action creation for suggestions --- web/react/dispatcher/event_helpers.jsx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'web/react/dispatcher') 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 + }); +} -- cgit v1.2.3-1-g7c22