Defer ChooseType teams list query until component visible
This commit is contained in:
parent
c98de5988e
commit
3ac9a418e6
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue