Fix issue with child collection not rerendering
This commit is contained in:
@@ -143,6 +143,7 @@ import { getSettingSubject } from "~/newstore/settings"
|
|||||||
import gql from "graphql-tag"
|
import gql from "graphql-tag"
|
||||||
import TeamCollectionAdapter from "~/helpers/teams/TeamCollectionAdapter"
|
import TeamCollectionAdapter from "~/helpers/teams/TeamCollectionAdapter"
|
||||||
import * as team_utils from "~/helpers/teams/utils"
|
import * as team_utils from "~/helpers/teams/utils"
|
||||||
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -172,12 +173,12 @@ export default {
|
|||||||
selectedTeam: undefined,
|
selectedTeam: undefined,
|
||||||
},
|
},
|
||||||
teamCollectionAdapter: new TeamCollectionAdapter(null),
|
teamCollectionAdapter: new TeamCollectionAdapter(null),
|
||||||
|
teamCollectionsNew: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subscriptions() {
|
subscriptions() {
|
||||||
return {
|
return {
|
||||||
SYNC_COLLECTIONS: getSettingSubject("syncCollections"),
|
SYNC_COLLECTIONS: getSettingSubject("syncCollections"),
|
||||||
teamCollectionsNew: this.teamCollectionAdapter.collections$,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -263,6 +264,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener("keydown", this._keyListener.bind(this))
|
document.addEventListener("keydown", this._keyListener.bind(this))
|
||||||
|
|
||||||
|
this.$subscribeTo(this.teamCollectionAdapter.collections$, (colls) => {
|
||||||
|
this.teamCollectionsNew = cloneDeep(colls)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateTeamCollections() {
|
updateTeamCollections() {
|
||||||
|
|||||||
Reference in New Issue
Block a user