Browse Source

set path with useEffect

kaori 4 years ago
parent
commit
9c375481b9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/app/src/components/PageDuplicateModal.jsx

+ 2 - 1
packages/app/src/components/PageDuplicateModal.jsx

@@ -101,8 +101,9 @@ const PageDuplicateModal = (props) => {
   useEffect(() => {
     if (isOpened) {
       getSubordinatedList();
+      setPageNameInput(path);
     }
-  }, [isOpened, getSubordinatedList]);
+  }, [isOpened, getSubordinatedList, path]);
 
   function changeIsDuplicateRecursivelyWithoutExistPathHandler() {
     setIsDuplicateRecursivelyWithoutExistPath(!isDuplicateRecursivelyWithoutExistPath);