diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-05-04 14:54:50 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-05-04 14:54:50 -0400 |
commit | 44a8f76d993cdd97785cab7fd55ad9f07c3c757a (patch) | |
tree | 810bb59d319388aae57715466b244edf84644c6a /webapp/components/suggestion/provider.jsx | |
parent | 72351c8ef8557c83b130568724fc2d6ff3acd454 (diff) | |
download | chat-44a8f76d993cdd97785cab7fd55ad9f07c3c757a.tar.gz chat-44a8f76d993cdd97785cab7fd55ad9f07c3c757a.tar.bz2 chat-44a8f76d993cdd97785cab7fd55ad9f07c3c757a.zip |
PLT-6431 Prevented autocompleting while suggestions are being received (#6328)
Diffstat (limited to 'webapp/components/suggestion/provider.jsx')
-rw-r--r-- | webapp/components/suggestion/provider.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webapp/components/suggestion/provider.jsx b/webapp/components/suggestion/provider.jsx index b65068d47..39bb135a8 100644 --- a/webapp/components/suggestion/provider.jsx +++ b/webapp/components/suggestion/provider.jsx @@ -1,6 +1,8 @@ // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import SuggestionStore from 'stores/suggestion_store.jsx'; + export default class Provider { constructor() { this.latestPrefix = ''; @@ -11,9 +13,12 @@ export default class Provider { // NO-OP for inherited classes to override } - startNewRequest(prefix) { + startNewRequest(suggestionId, prefix) { this.latestPrefix = prefix; this.latestComplete = false; + + // Don't use the dispatcher here since this is only called while handling an event + SuggestionStore.setSuggestionsPending(suggestionId, true); } shouldCancelDispatch(prefix) { |