mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	fix: Explorer Page State Not Working On Hitting Back (#6171)
This commit is contained in:
		| @@ -121,7 +121,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import RecipeExplorerPageSearchFilters from "./RecipeExplorerPageSearchFilters.vue"; | ||||
| import { useRecipeExplorerSearch } from "~/composables/use-recipe-explorer-search"; | ||||
| import { useRecipeExplorerSearch, clearRecipeExplorerSearchState } from "~/composables/use-recipe-explorer-search"; | ||||
|  | ||||
| const emit = defineEmits<{ | ||||
|   ready: []; | ||||
| @@ -155,6 +155,11 @@ onMounted(async () => { | ||||
|   emit("ready"); | ||||
| }); | ||||
|  | ||||
| onUnmounted(() => { | ||||
|   // Clear the cache when component unmounts to ensure fresh state on remount | ||||
|   clearRecipeExplorerSearchState(groupSlug.value); | ||||
| }); | ||||
|  | ||||
| const sortText = computed(() => { | ||||
|   const sort = sortable.value.find(s => s.value === state.value.orderBy); | ||||
|   if (!sort) return ""; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user