fix(front): reset instances list to page 1 if filter or follow status changes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
5cb4fc11c4
commit
2b5439b1d0
|
@ -233,7 +233,7 @@ import {
|
||||||
useRouteQuery,
|
useRouteQuery,
|
||||||
} from "vue-use-route-query";
|
} from "vue-use-route-query";
|
||||||
import { useMutation, useQuery } from "@vue/apollo-composable";
|
import { useMutation, useQuery } from "@vue/apollo-composable";
|
||||||
import { computed, inject, ref } from "vue";
|
import { computed, inject, ref, watch } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useHead } from "@unhead/vue";
|
import { useHead } from "@unhead/vue";
|
||||||
import CloudQuestion from "../../../node_modules/vue-material-design-icons/CloudQuestion.vue";
|
import CloudQuestion from "../../../node_modules/vue-material-design-icons/CloudQuestion.vue";
|
||||||
|
@ -263,6 +263,10 @@ const { result: instancesResult } = useQuery<{
|
||||||
{ debounce: 500 }
|
{ debounce: 500 }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch([filterDomain, followStatus], () => {
|
||||||
|
instancePage.value = 1;
|
||||||
|
});
|
||||||
|
|
||||||
const instances = computed(() => instancesResult.value?.instances);
|
const instances = computed(() => instancesResult.value?.instances);
|
||||||
|
|
||||||
const { t } = useI18n({ useScope: "global" });
|
const { t } = useI18n({ useScope: "global" });
|
||||||
|
|
Loading…
Reference in a new issue