From a5a6b864a529661ab93e87240e788ff5875554fe Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Sun, 9 May 2021 02:08:48 -0400 Subject: [PATCH] Fix issue with child collection not rerendering --- components/collections/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/collections/index.vue b/components/collections/index.vue index 1312a211c..05d5c631d 100644 --- a/components/collections/index.vue +++ b/components/collections/index.vue @@ -143,6 +143,7 @@ import { getSettingSubject } from "~/newstore/settings" import gql from "graphql-tag" import TeamCollectionAdapter from "~/helpers/teams/TeamCollectionAdapter" import * as team_utils from "~/helpers/teams/utils" +import cloneDeep from "lodash/cloneDeep" export default { props: { @@ -172,12 +173,12 @@ export default { selectedTeam: undefined, }, teamCollectionAdapter: new TeamCollectionAdapter(null), + teamCollectionsNew: [], } }, subscriptions() { return { SYNC_COLLECTIONS: getSettingSubject("syncCollections"), - teamCollectionsNew: this.teamCollectionAdapter.collections$, } }, watch: { @@ -263,6 +264,10 @@ export default { } } document.addEventListener("keydown", this._keyListener.bind(this)) + + this.$subscribeTo(this.teamCollectionAdapter.collections$, (colls) => { + this.teamCollectionsNew = cloneDeep(colls) + }) }, methods: { updateTeamCollections() {