From 5c1ab647fc734c9b746d1450dfe90eb84df0bbb6 Mon Sep 17 00:00:00 2001 From: Pooja Belaramani Date: Tue, 31 Dec 2024 13:01:41 +0530 Subject: [PATCH] fix: collapse collection on clicking name --- .../Collections/Collection/CollectionItem/index.js | 6 ++++++ .../Sidebar/Collections/Collection/index.js | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js index 689574a90..ed402825d 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js @@ -135,6 +135,12 @@ const CollectionItem = ({ item, collection, searchText }) => { type: 'folder-settings' }) ); + dispatch( + collectionFolderClicked({ + itemUid: item.uid, + collectionUid: collection.uid + }) + ); }; const handleFolderCollapse = () => { diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js index 9ac3b6793..61dd8b6ed 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/index.js @@ -68,6 +68,17 @@ const Collection = ({ collection, searchText }) => { dispatch(collectionClicked(collection.uid)); }; + const handleCollapseCollection = () => { + dispatch(collectionClicked(collection.uid)); + dispatch( + addTab({ + uid: uuid(), + collectionUid: collection.uid, + type: 'collection-settings' + }) + ); + } + const handleRightClick = (event) => { const _menuDropdown = menuDropdownTippyRef.current; if (_menuDropdown) { @@ -150,7 +161,7 @@ const Collection = ({ collection, searchText }) => { onClick={handleClick} />