diff --git a/renderer/components/Dropdown/index.js b/renderer/components/Dropdown/index.js index ae30d125f..9ed14e75f 100644 --- a/renderer/components/Dropdown/index.js +++ b/renderer/components/Dropdown/index.js @@ -5,7 +5,7 @@ import StyledWrapper from './StyledWrapper'; const Dropdown = ({icon, children, onCreate, placement}) => { return ( - { }); 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,20 +65,16 @@ const Collection = ({collection}) => { {collection.current.name}
} placement='bottom-start'> -
-
{ - menuDropdownTippyRef.current.hide(); - }}> - Add Request -
+
{ + menuDropdownTippyRef.current.hide(); + }}> + Add Request
-
-
{ - menuDropdownTippyRef.current.hide(); - setShowAddFolderModal(true) - }}> - Add Folder -
+
{ + menuDropdownTippyRef.current.hide(); + setShowAddFolderModal(true) + }}> + Add Folder
diff --git a/renderer/components/Sidebar/index.js b/renderer/components/Sidebar/index.js index 386162817..f1c6e262a 100644 --- a/renderer/components/Sidebar/index.js +++ b/renderer/components/Sidebar/index.js @@ -12,7 +12,7 @@ const Sidebar = ({collections, actions, dispatch, activeRequestTabId}) => {
-
+