summaryrefslogtreecommitdiffstats
path: root/web/react/components/search_bar.jsx
diff options
context:
space:
mode:
authorGirish S <girish.sonawane@gmail.com>2015-10-26 12:25:14 +0530
committerGirish S <girish.sonawane@gmail.com>2015-10-26 12:25:14 +0530
commit4cfde35256cecab12d317e0d829769143f4df2d0 (patch)
treea80b99e8cbe4bb1fd10b5c3164f8365e592d326f /web/react/components/search_bar.jsx
parentae2898107d275176126ab07ca1886fd7fd7ddad4 (diff)
downloadchat-4cfde35256cecab12d317e0d829769143f4df2d0.tar.gz
chat-4cfde35256cecab12d317e0d829769143f4df2d0.tar.bz2
chat-4cfde35256cecab12d317e0d829769143f4df2d0.zip
append * to search query if not present and highlight partial matches
Diffstat (limited to 'web/react/components/search_bar.jsx')
-rw-r--r--web/react/components/search_bar.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx
index e1d36ad7d..fae26f803 100644
--- a/web/react/components/search_bar.jsx
+++ b/web/react/components/search_bar.jsx
@@ -105,6 +105,10 @@ export default class SearchBar extends React.Component {
performSearch(terms, isMentionSearch) {
if (terms.length) {
this.setState({isSearching: true});
+
+ if(terms.search(/\*\s*$/) == -1) // append * if not present
+ terms = terms + "*";
+
client.search(
terms,
(data) => {