diff --git a/console/src/components/TagFilterDropdown.vue b/console/src/components/TagFilterDropdown.vue index 1b63880..482c05c 100644 --- a/console/src/components/TagFilterDropdown.vue +++ b/console/src/components/TagFilterDropdown.vue @@ -24,12 +24,10 @@ const emit = defineEmits<{ (event: "update:modelValue", value?: string): void; }>(); -const page = ref(1); -const size = ref(20); -const keyword = ref(undefined); +const keyword = ref(undefined); -const { data: tags } = useQuery({ - queryKey: ["tags", page, size, keyword], +const { data: tags, refetch } = useQuery({ + queryKey: ["moments-tags"], queryFn: async () => { const { data } = await apiClient.get( "/apis/console.api.moment.halo.run/v1alpha1/tags", @@ -41,7 +39,6 @@ const { data: tags } = useQuery({ ); return data; }, - refetchOnWindowFocus: false, }); const searchResults = computed(() => tags.value || []); @@ -65,7 +62,7 @@ const handleCloseTag = (event: Event) => {