-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gui] Remember filters when navigate between pages
- Loading branch information
1 parent
f5defa9
commit c01c3bf
Showing
9 changed files
with
87 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { CLEAR_QUERIES, SET_QUERIES } from "../mutations.type"; | ||
|
||
const state = { | ||
queries: {} | ||
}; | ||
|
||
const getters = { | ||
queries(state) { | ||
return state.queries; | ||
} | ||
}; | ||
|
||
const mutations = { | ||
[CLEAR_QUERIES](state, { except }) { | ||
if (except) { | ||
Object.keys(state.queries).forEach(key => { | ||
if (!except.includes(key)) | ||
delete state.queries[key]; | ||
}); | ||
} else { | ||
state.queries = {}; | ||
} | ||
}, | ||
|
||
[SET_QUERIES](state, { location, query }) { | ||
state.queries[location] = query; | ||
} | ||
}; | ||
|
||
export default { | ||
state, | ||
mutations, | ||
getters | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters