From 4845067582fdb9092413207f93eff36e0711354a Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 27 Nov 2015 10:38:35 -0500 Subject: Fixed losing suggestion selection when entering additional characters --- web/react/stores/suggestion_store.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web/react/stores') 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(); -- cgit v1.2.3-1-g7c22