diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-30 14:12:09 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-12-01 16:25:58 -0500 |
commit | 956d460b108f278b6cfbcb728241b89b992b2a55 (patch) | |
tree | 516b6ef634dbbad01a908e4d49c8f7935b4f795f /web/react/components/search_bar.jsx | |
parent | bedb1a751f45e39c5747f2c6280dae958748e2f0 (diff) | |
download | chat-956d460b108f278b6cfbcb728241b89b992b2a55.tar.gz chat-956d460b108f278b6cfbcb728241b89b992b2a55.tar.bz2 chat-956d460b108f278b6cfbcb728241b89b992b2a55.zip |
Changed SuggestionProviders to be regular objects and not singletons
Diffstat (limited to 'web/react/components/search_bar.jsx')
-rw-r--r-- | web/react/components/search_bar.jsx | 4 |
1 files changed, 3 insertions, 1 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} <Popover |