append * to search query if not present and highlight partial matches

Этот коммит содержится в:
Girish S
2015-10-26 12:25:14 +05:30
родитель ae2898107d
Коммит 4cfde35256
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@@ -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) => {