summaryrefslogtreecommitdiffstats
path: root/web/react/stores
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-27 10:38:35 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-12-01 16:27:21 -0500
commit4845067582fdb9092413207f93eff36e0711354a (patch)
treec11bad52bf252dd77806d70e8d7cfd67262d51b3 /web/react/stores
parent956d460b108f278b6cfbcb728241b89b992b2a55 (diff)
downloadchat-4845067582fdb9092413207f93eff36e0711354a.tar.gz
chat-4845067582fdb9092413207f93eff36e0711354a.tar.bz2
chat-4845067582fdb9092413207f93eff36e0711354a.zip
Fixed losing suggestion selection when entering additional characters
Diffstat (limited to 'web/react/stores')
-rw-r--r--web/react/stores/suggestion_store.jsx8
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();