forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.js
44 lines (39 loc) · 1.07 KB
/
search.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {SearchTypes} from 'utils/constants';
export function setModalSearchTerm(term) {
return async (dispatch) => {
dispatch({
type: SearchTypes.SET_MODAL_SEARCH,
data: term,
});
return {data: true};
};
}
export function setUserGridSearch(term) {
return async (dispatch) => {
dispatch({
type: SearchTypes.SET_USER_GRID_SEARCH,
data: term,
});
return {data: true};
};
}
export function setUserGridFilters(filters = {}) {
return async (dispatch) => {
dispatch({
type: SearchTypes.SET_USER_GRID_FILTERS,
data: filters,
});
return {data: true};
};
}
export function setSystemUsersSearch(term, team = '', filter = '') {
return async (dispatch) => {
dispatch({
type: SearchTypes.SET_SYSTEM_USERS_SEARCH,
data: {term, team, filter},
});
return {data: true};
};
}