From 479f60518bd43705bcd4c12f5603434fe79f3308 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 16 Feb 2024 17:35:05 +0500 Subject: [PATCH] web: add child notebook under opened notebook --- apps/web/src/views/notebook.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/views/notebook.tsx b/apps/web/src/views/notebook.tsx index 437147ae2..351b4c78b 100644 --- a/apps/web/src/views/notebook.tsx +++ b/apps/web/src/views/notebook.tsx @@ -288,7 +288,9 @@ function SubNotebooks({ }} onClick={async (e) => { e.stopPropagation(); - await showAddNotebookDialog(rootId); + await showAddNotebookDialog( + context?.type === "notebook" ? context.id : rootId + ); }} > @@ -345,7 +347,6 @@ function SubNotebooks({ }; }, async getTreeItems(itemIds) { - console.log("get tree items:", itemIds); const notebooks = await db.notebooks.all.records( itemIds as string[], db.settings.getGroupOptions("notebooks")