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 (