diff options
author | prixone <prixone@users.noreply.github.com> | 2017-03-31 10:53:19 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-03-31 09:53:19 -0400 |
commit | fa40bfb9e6f3bcdfe631301be2ee3ce755cbef0e (patch) | |
tree | bc3ccaf4f97c1b1ff68b45e5b4d8b4b2b2135200 /webapp | |
parent | bd5b6f19caaeaa339a0305830f7d70ab68b481ff (diff) | |
download | chat-fa40bfb9e6f3bcdfe631301be2ee3ce755cbef0e.tar.gz chat-fa40bfb9e6f3bcdfe631301be2ee3ce755cbef0e.tar.bz2 chat-fa40bfb9e6f3bcdfe631301be2ee3ce755cbef0e.zip |
Fixed @ not working on latest build due to... (#5878)
* Fixed @ not working on latest build due to...
On latest build the @ shortcut to search for mentions was not working due to missing parameters on the onListenerChange method, due to changes done previously to post_action and search_bar that were not made to the onListenerChange method.
* Update search_bar.jsx
added fix for when no notification options for mentions is defined by the user...
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/search_bar.jsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/webapp/components/search_bar.jsx b/webapp/components/search_bar.jsx index 42a124eda..910e3f5d9 100644 --- a/webapp/components/search_bar.jsx +++ b/webapp/components/search_bar.jsx @@ -74,8 +74,17 @@ export default class SearchBar extends React.Component { if (!Utils.areObjectsEqual(newState, this.state)) { this.setState(newState); } - if (doSearch) { - this.performSearch(newState.searchTerm, isMentionSearch); + if (doSearch && newState && newState.searchTerm.length) { + performSearch( + newState.searchTerm, + isMentionSearch, + () => { + this.handleSearchOnSuccess(); + }, + () => { + this.handleSearchOnError(); + } + ); } } } |