diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-27 10:38:35 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-12-01 16:27:21 -0500 |
commit | 4845067582fdb9092413207f93eff36e0711354a (patch) | |
tree | c11bad52bf252dd77806d70e8d7cfd67262d51b3 | |
parent | 956d460b108f278b6cfbcb728241b89b992b2a55 (diff) | |
download | chat-4845067582fdb9092413207f93eff36e0711354a.tar.gz chat-4845067582fdb9092413207f93eff36e0711354a.tar.bz2 chat-4845067582fdb9092413207f93eff36e0711354a.zip |
Fixed losing suggestion selection when entering additional characters
-rw-r--r-- | web/react/stores/suggestion_store.jsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/react/stores/suggestion_store.jsx b/web/react/stores/suggestion_store.jsx index 016929501..8e64d02a3 100644 --- a/web/react/stores/suggestion_store.jsx +++ b/web/react/stores/suggestion_store.jsx @@ -93,6 +93,11 @@ class SuggestionStore extends EventEmitter { suggestion.terms = []; suggestion.items = []; suggestion.components = []; + } + + clearSelection(id) { + const suggestion = this.suggestions.get(id); + suggestion.selection = ''; } @@ -237,10 +242,11 @@ class SuggestionStore extends EventEmitter { this.setPretext(id, ''); this.clearSuggestions(id); + this.clearSelection(id); this.emitSuggestionsChanged(id); break; } } } -export default new SuggestionStore();
\ No newline at end of file +export default new SuggestionStore(); |