web: add child notebook under opened notebook

This commit is contained in:
Abdullah Atta
2024-02-16 17:35:05 +05:00
parent a71ac363bb
commit 479f60518b

View File

@@ -288,7 +288,9 @@ function SubNotebooks({
}}
onClick={async (e) => {
e.stopPropagation();
await showAddNotebookDialog(rootId);
await showAddNotebookDialog(
context?.type === "notebook" ? context.id : rootId
);
}}
>
<Plus size={20} />
@@ -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")