aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins/modules/search.ts
blob: 1626038742dfb675ba20442972b0e73d46643b61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
interface SearchStoreState {
    searchValue: string
}

export const searchModule = {
    state: () => ({
        // This is the treated value of search input
        searchValue: '',
        // Selected mod categories
        selectedCategories: [],
        sortValue: {label: '', value: ''}
    }),
    getters: {
        searchWords(state: SearchStoreState): string {
            return state.searchValue.toLowerCase();
        }
    }
  }