From 0de2d6d8994dcb8e3c6674507e63cca6a5cbbe97 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Mon, 22 Apr 2024 14:21:52 +0200 Subject: [PATCH] Auto-select last document when saving new document --- src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 4fabafde4..e3c82da04 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -453,6 +453,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ ); }, ) + .then(() => setSelectedRows(new Set([documentIds.length - 1]))) .finally(() => setIsExecuting(false)); }; @@ -1284,6 +1285,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ ); }, ) + .then(() => setSelectedRows(new Set([documentIds.length - 1]))) .finally(() => setIsExecuting(false)); };