From 75424707cf0438ef425114712a203686dbf78561 Mon Sep 17 00:00:00 2001 From: Flawid DSouza Date: Thu, 12 Dec 2024 10:34:12 +0530 Subject: [PATCH] fix(ui): Folder Panel data goes out of sync between state.collection & state.tabs causing persistence issues when switching tabs in both file workspaces and indexeddb workspaces --- packages/ui/src/store.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ui/src/store.ts b/packages/ui/src/store.ts index 6915ff89..d4053f18 100644 --- a/packages/ui/src/store.ts +++ b/packages/ui/src/store.ts @@ -1580,8 +1580,15 @@ export const store = createStore({ await context.dispatch('refreshWorkspace') } else { + console.log('collectionItem headers and authentication updated') collectionItem.headers = headers collectionItem.authentication = authentication + + // keep tab properties in tabs in sync with collectionItem + const tab = store.state.tabs.find(tab => tab._id === collectionItem._id) + if(tab) { + Object.assign(tab, collectionItem) + } } return {