Browse Source

watch dropdownOpen

yusuketk 5 years ago
parent
commit
e57497090b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/client/js/components/Page/CopyDropdown.jsx

+ 2 - 2
src/client/js/components/Page/CopyDropdown.jsx

@@ -41,7 +41,7 @@ const CopyDropdown = (props) => {
    * functions to construct labels and URLs
    */
   const getUriParams = useCallback(() => {
-    if (!isParamsAppended) {
+    if (!isParamsAppended || !dropdownOpen) {
       return '';
     }
 
@@ -50,7 +50,7 @@ const CopyDropdown = (props) => {
     } = window.location;
 
     return `${search}${hash}`;
-  }, [isParamsAppended]);
+  }, [isParamsAppended, dropdownOpen]);
 
   const pagePathWithParams = useMemo(() => {
     const { pagePath } = props;