From 956d460b108f278b6cfbcb728241b89b992b2a55 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 30 Nov 2015 14:12:09 -0500 Subject: Changed SuggestionProviders to be regular objects and not singletons --- web/react/components/search_bar.jsx | 4 +++- web/react/components/search_channel_provider.jsx | 4 +--- web/react/components/search_user_provider.jsx | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx index 19ff8386f..0ea5c451a 100644 --- a/web/react/components/search_bar.jsx +++ b/web/react/components/search_bar.jsx @@ -28,6 +28,8 @@ export default class SearchBar extends React.Component { const state = this.getSearchTermStateFromStores(); state.focused = false; this.state = state; + + this.suggestionProviders = [new SearchChannelProvider(), new SearchUserProvider()]; } getSearchTermStateFromStores() { var term = SearchStore.getSearchTerm() || ''; @@ -162,7 +164,7 @@ export default class SearchBar extends React.Component { onFocus={this.handleUserFocus} onBlur={this.handleUserBlur} onUserInput={this.handleUserInput} - providers={[SearchChannelProvider, SearchUserProvider]} + providers={this.suggestionProviders} /> {isSearching}