From fa40bfb9e6f3bcdfe631301be2ee3ce755cbef0e Mon Sep 17 00:00:00 2001 From: prixone Date: Fri, 31 Mar 2017 10:53:19 -0300 Subject: [PATCH] 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... --- webapp/components/search_bar.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/webapp/components/search_bar.jsx b/webapp/components/search_bar.jsx index 42a124eda9..910e3f5d9f 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(); + } + ); } } }