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) => {
|
||||
let envTippyEl = get(menuDropdownTippyRef, 'current.reference');
|
||||
if(envTippyEl && envTippyEl.contains && envTippyEl.contains(event.target)) {
|
||||
let tippyEl = get(menuDropdownTippyRef, 'current.reference');
|
||||
if(tippyEl && tippyEl.contains && tippyEl.contains(event.target)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(event && event.target && event.target.className === 'dropdown-item') {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -61,21 +65,17 @@ const Collection = ({collection}) => {
|
||||
<span className="ml-1">{collection.current.name}</span>
|
||||
<div className="collection-actions">
|
||||
<Dropdown onCreate={onMenuDropdownCreate} icon={<MenuIcon />} placement='bottom-start'>
|
||||
<div>
|
||||
<div className="dropdown-item" onClick={(e) => {
|
||||
menuDropdownTippyRef.current.hide();
|
||||
}}>
|
||||
Add Request
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="dropdown-item" onClick={(e) => {
|
||||
menuDropdownTippyRef.current.hide();
|
||||
setShowAddFolderModal(true)
|
||||
}}>
|
||||
Add Folder
|
||||
</div>
|
||||
</div>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -12,7 +12,7 @@ const Sidebar = ({collections, actions, dispatch, activeRequestTabId}) => {
|
||||
<div className="flex flex-row h-full">
|
||||
<MenuBar />
|
||||
|
||||
<div>
|
||||
<div className="flex flex-col flex-grow">
|
||||
<TitleBar
|
||||
actions={actions}
|
||||
dispatch={dispatch}
|
||||
|
Loading…
Reference in New Issue
Block a user