mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 20:01:28 +00:00
fix: collapse collection on clicking name
This commit is contained in:
@@ -135,6 +135,12 @@ const CollectionItem = ({ item, collection, searchText }) => {
|
||||
type: 'folder-settings'
|
||||
})
|
||||
);
|
||||
dispatch(
|
||||
collectionFolderClicked({
|
||||
itemUid: item.uid,
|
||||
collectionUid: collection.uid
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const handleFolderCollapse = () => {
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
<div className="ml-1" id="sidebar-collection-name"
|
||||
onClick={viewCollectionSettings}
|
||||
onClick={handleCollapseCollection}
|
||||
onContextMenu={handleRightClick}>
|
||||
{collection.name}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user