From 607e901673c616e667fdf04db0a6768202fb5cc2 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 22 Feb 2024 15:43:53 +0500 Subject: [PATCH] web: expand parent when a child notebook is added --- apps/web/src/views/notebook.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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}