Defer ChooseType teams list query until component visible
This commit is contained in:
@@ -61,6 +61,11 @@ export default {
|
|||||||
doc: Boolean,
|
doc: Boolean,
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
skipTeamsFetching: true
|
||||||
|
}
|
||||||
|
},
|
||||||
subscriptions() {
|
subscriptions() {
|
||||||
return {
|
return {
|
||||||
currentUser: currentUserInfo$,
|
currentUser: currentUserInfo$,
|
||||||
@@ -78,12 +83,16 @@ export default {
|
|||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
pollInterval: 10000,
|
pollInterval: 10000,
|
||||||
|
skip() {
|
||||||
|
return this.skipTeamsFetching
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTeamSelectIntersect() {
|
onTeamSelectIntersect() {
|
||||||
// Load team data as soon as intersection
|
// Load team data as soon as intersection
|
||||||
this.$apollo.queries.myTeams.refetch()
|
this.$apollo.queries.myTeams.refetch()
|
||||||
|
this.skipTeamsFetching = false
|
||||||
},
|
},
|
||||||
updateCollectionsType(tabID) {
|
updateCollectionsType(tabID) {
|
||||||
this.$emit("update-collection-type", tabID)
|
this.$emit("update-collection-type", tabID)
|
||||||
|
|||||||
Reference in New Issue
Block a user