Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Defer ChooseType teams list query until component visible

Andrew Bastin3ac9a418e600
diff --git a/components/collections/ChooseType.vue b/components/collections/ChooseType.vue
index 01745b9f2..acc8b565d 100644
--- a/components/collections/ChooseType.vue
+++ b/components/collections/ChooseType.vue
@@ -61,6 +61,11 @@ export default {
doc: Boolean,
show: Boolean,
},
+ data() {
+ return {
+ skipTeamsFetching: true
+ }
+ },
subscriptions() {
return {
currentUser: currentUserInfo$,
@@ -78,12 +83,16 @@ export default {
}
`,
pollInterval: 10000,
+ skip() {
+ return this.skipTeamsFetching
+ }
},
},
methods: {
onTeamSelectIntersect() {
// Load team data as soon as intersection
this.$apollo.queries.myTeams.refetch()
+ this.skipTeamsFetching = false
},
updateCollectionsType(tabID) {
this.$emit("update-collection-type", tabID)