forked from extern/bruno
fix: fixed collection collapse while adding folders
This commit is contained in:
parent
2f594835d8
commit
e775cd47a9
@ -33,8 +33,12 @@ const Collection = ({collection}) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleClick = (event) => {
|
const handleClick = (event) => {
|
||||||
let envTippyEl = get(menuDropdownTippyRef, 'current.reference');
|
let tippyEl = get(menuDropdownTippyRef, 'current.reference');
|
||||||
if(envTippyEl && envTippyEl.contains && envTippyEl.contains(event.target)) {
|
if(tippyEl && tippyEl.contains && tippyEl.contains(event.target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event && event.target && event.target.className === 'dropdown-item') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,21 +65,17 @@ const Collection = ({collection}) => {
|
|||||||
<span className="ml-1">{collection.current.name}</span>
|
<span className="ml-1">{collection.current.name}</span>
|
||||||
<div className="collection-actions">
|
<div className="collection-actions">
|
||||||
<Dropdown onCreate={onMenuDropdownCreate} icon={<MenuIcon />} placement='bottom-start'>
|
<Dropdown onCreate={onMenuDropdownCreate} icon={<MenuIcon />} placement='bottom-start'>
|
||||||
<div>
|
|
||||||
<div className="dropdown-item" onClick={(e) => {
|
<div className="dropdown-item" onClick={(e) => {
|
||||||
menuDropdownTippyRef.current.hide();
|
menuDropdownTippyRef.current.hide();
|
||||||
}}>
|
}}>
|
||||||
Add Request
|
Add Request
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className="dropdown-item" onClick={(e) => {
|
<div className="dropdown-item" onClick={(e) => {
|
||||||
menuDropdownTippyRef.current.hide();
|
menuDropdownTippyRef.current.hide();
|
||||||
setShowAddFolderModal(true)
|
setShowAddFolderModal(true)
|
||||||
}}>
|
}}>
|
||||||
Add Folder
|
Add Folder
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@ const Sidebar = ({collections, actions, dispatch, activeRequestTabId}) => {
|
|||||||
<div className="flex flex-row h-full">
|
<div className="flex flex-row h-full">
|
||||||
<MenuBar />
|
<MenuBar />
|
||||||
|
|
||||||
<div>
|
<div className="flex flex-col flex-grow">
|
||||||
<TitleBar
|
<TitleBar
|
||||||
actions={actions}
|
actions={actions}
|
||||||
dispatch={dispatch}
|
dispatch={dispatch}
|
||||||
|
Loading…
Reference in New Issue
Block a user