From f556e50be40fb84b0de9a391261e5840f31c8eed Mon Sep 17 00:00:00 2001 From: ascarbek Date: Thu, 9 Mar 2023 22:54:38 +0600 Subject: [PATCH] fix: page rename position --- .../components/layout/NavigationPanel/PageItem.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/PageItem.tsx b/frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/PageItem.tsx index 550ea35f63..7e07d06316 100644 --- a/frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/PageItem.tsx +++ b/frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/PageItem.tsx @@ -35,11 +35,11 @@ export const PageItem = ({ page, onPageClick }: { page: IPage; onPageClick: () = const [popupY, setPopupY] = useState(0); useEffect(() => { - if (showPageOptions && el.current) { + if (el.current) { const { top } = el.current.getBoundingClientRect(); setPopupY(top); } - }, [showPageOptions]); + }, [showPageOptions, showRenamePopup]); return (
@@ -80,6 +80,7 @@ export const PageItem = ({ page, onPageClick }: { page: IPage; onPageClick: () = value={page.title} onChange={(newTitle) => changePageTitle(newTitle)} onClose={closeRenamePopup} + top={popupY - 124 + 40} > )}