From 7c16e795e217861e7fd2d580a63d537cb53e1dc0 Mon Sep 17 00:00:00 2001 From: ArthurMousatov Date: Wed, 23 Aug 2023 22:31:22 -0400 Subject: [PATCH] fix: selections should now work post-folder creation (#2659) --- frontend/src/store/mutations.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/store/mutations.js b/frontend/src/store/mutations.js index c0d66561..8387f917 100644 --- a/frontend/src/store/mutations.js +++ b/frontend/src/store/mutations.js @@ -79,7 +79,11 @@ const mutations = { }, updateRequest: (state, value) => { state.oldReq = state.req; + const selectedItems = state.selected.map((i) => state.req.items[i]); state.req = value; + state.selected = state.req.items + .filter((item) => selectedItems.some((rItem) => rItem.url === item.url)) + .map((item) => item.index); }, updateClipboard: (state, value) => { state.clipboard.key = value.key;