Replaced CommandList with the new suggestion components

Этот коммит содержится в:
hmhealey
2015-12-01 10:54:53 -05:00
родитель 713115be51
Коммит 0c449ba5c9
5 изменённых файлов: 82 добавлений и 146 удалений

Просмотреть файл

@@ -223,11 +223,13 @@ class SuggestionStore extends EventEmitter {
this.emitSuggestionsChanged(id);
break;
case ActionTypes.SUGGESTION_RECEIVED_SUGGESTIONS:
this.setMatchedPretext(id, other.matchedPretext);
this.addSuggestions(id, other.terms, other.items, other.componentType);
if (other.matchedPretext === this.getMatchedPretext(id)) {
// ensure the matched pretext hasn't changed so that we don't receive suggestions for outdated pretext
this.addSuggestions(id, other.terms, other.items, other.component);
this.ensureSelectionExists(id);
this.emitSuggestionsChanged(id);
this.ensureSelectionExists(id);
this.emitSuggestionsChanged(id);
}
break;
case ActionTypes.SUGGESTION_SELECT_NEXT:
this.selectNext(id);