From 89767d01355fc151f61ebbf47e64867410ec7c65 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 6 Mar 2025 22:21:50 +0200 Subject: [PATCH] feat(client): allow triggering search on hash change --- src/public/app/components/app_context.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts index bafeaaa60..8c62a5586 100644 --- a/src/public/app/components/app_context.ts +++ b/src/public/app/components/app_context.ts @@ -551,10 +551,12 @@ $(window).on("beforeunload", () => { }); $(window).on("hashchange", function () { - const { notePath, ntxId, viewScope } = linkService.parseNavigationStateFromUrl(window.location.href); + const { notePath, ntxId, viewScope, searchString } = linkService.parseNavigationStateFromUrl(window.location.href); if (notePath || ntxId) { appContext.tabManager.switchToNoteContext(ntxId, notePath, viewScope); + } else if (searchString) { + appContext.triggerCommand("searchNotes", { searchString }); } });