Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: expand parent when a child notebook is added

Abdullah Atta963f33129059
diff --git a/apps/web/src/views/notebook.tsx b/apps/web/src/views/notebook.tsx
index c40500471..c9d61f42e 100644
--- a/apps/web/src/views/notebook.tsx
+++ b/apps/web/src/views/notebook.tsx
@@ -367,9 +367,10 @@ function SubNotebooks({
expand={props.context.expandItem}
focus={props.context.focusItem}
rootId={rootId}
- refresh={() =>
- reloadItem.current && reloadItem.current([props.item.index])
- }
+ refresh={() => {
+ reloadItem.current && reloadItem.current([props.item.index]);
+ setTimeout(() => props.context.expandItem());
+ }}
/>
{props.children}
</>