diff options
Diffstat (limited to 'src-vue/src/plugins/modules/search.ts')
-rw-r--r-- | src-vue/src/plugins/modules/search.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src-vue/src/plugins/modules/search.ts b/src-vue/src/plugins/modules/search.ts new file mode 100644 index 00000000..16260387 --- /dev/null +++ b/src-vue/src/plugins/modules/search.ts @@ -0,0 +1,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(); + } + } + } +
\ No newline at end of file |