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...
This commit is contained in:
prixone
2017-03-31 10:53:19 -03:00
committed by Christopher Speller
parent bd5b6f19ca
commit fa40bfb9e6

View File

@@ -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();
}
);
}
}
}