File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 121121
122122<script setup lang="ts">
123123import RecipeExplorerPageSearchFilters from " ./RecipeExplorerPageSearchFilters.vue" ;
124- import { useRecipeExplorerSearch } from " ~/composables/use-recipe-explorer-search" ;
124+ import { useRecipeExplorerSearch , clearRecipeExplorerSearchState } from " ~/composables/use-recipe-explorer-search" ;
125125
126126const emit = defineEmits <{
127127 ready: [];
@@ -155,6 +155,11 @@ onMounted(async () => {
155155 emit (" ready" );
156156});
157157
158+ onUnmounted (() => {
159+ // Clear the cache when component unmounts to ensure fresh state on remount
160+ clearRecipeExplorerSearchState (groupSlug .value );
161+ });
162+
158163const sortText = computed (() => {
159164 const sort = sortable .value .find (s => s .value === state .value .orderBy );
160165 if (! sort ) return " " ;
You can’t perform that action at this time.
0 commit comments