mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
fix: Recipe Search URL State (#3332)
* fix several state issues with explore page - update state when there are no query params - only call search if the query params actually changed - wait until ready to call API * store last search query in user prefs * restore chip tag click to anonymous user
This commit is contained in:
parent
21886ab4b8
commit
dfbc890f2c
3 changed files with 101 additions and 55 deletions
|
@ -20,6 +20,7 @@ export interface UserRecipePreferences {
|
|||
filterNull: boolean;
|
||||
sortIcon: string;
|
||||
useMobileCards: boolean;
|
||||
searchQuery: string;
|
||||
}
|
||||
|
||||
export interface UserShoppingListPreferences {
|
||||
|
@ -59,6 +60,7 @@ export function useUserSortPreferences(): Ref<UserRecipePreferences> {
|
|||
filterNull: false,
|
||||
sortIcon: $globals.icons.sortAlphabeticalAscending,
|
||||
useMobileCards: false,
|
||||
searchQuery: "",
|
||||
},
|
||||
{ mergeDefaults: true }
|
||||
// we cast to a Ref because by default it will return an optional type ref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue