From cc468d964f3c914a108dd3ec12f54c2bac978731 Mon Sep 17 00:00:00 2001 From: contributor Date: Sat, 22 Nov 2025 14:38:18 +0200 Subject: [PATCH] add ability to auto execute search note --- .../client/src/widgets/ribbon/SearchDefinitionTab.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx index ac7bf8d14..8b31655c4 100644 --- a/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx +++ b/apps/client/src/widgets/ribbon/SearchDefinitionTab.tsx @@ -73,6 +73,17 @@ export default function SearchDefinitionTab({ note, ntxId, hidden }: TabContext) } }); + useEffect(() => { + async function autoExecute() { + if (!hidden && note?.hasLabel("autoExecuteSearch")) { + await refreshResults(); + parentComponent?.triggerCommand("toggleRibbonTabBookProperties", {}); + } + } + + autoExecute(); + }, [note?.noteId, hidden]); + return (