mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
add query parameter to search page
This commit is contained in:
parent
3f11b3261b
commit
c776ea6f8b
1 changed files with 8 additions and 1 deletions
|
@ -65,7 +65,6 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchString: "",
|
|
||||||
maxResults: 21,
|
maxResults: 21,
|
||||||
searchResults: [],
|
searchResults: [],
|
||||||
catFilter: {
|
catFilter: {
|
||||||
|
@ -95,6 +94,14 @@ export default {
|
||||||
this.$store.dispatch("requestAllRecipes");
|
this.$store.dispatch("requestAllRecipes");
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
searchString: {
|
||||||
|
set(q) {
|
||||||
|
this.$router.replace({ query: { ...this.$route.query, q } });
|
||||||
|
},
|
||||||
|
get() {
|
||||||
|
return this.$route.query.q || "";
|
||||||
|
},
|
||||||
|
},
|
||||||
allRecipes() {
|
allRecipes() {
|
||||||
return this.$store.getters.getAllRecipes;
|
return this.$store.getters.getAllRecipes;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue