Skip to content

Build your personal knowledge base with Trilium Notes

fix(search): help button not working (closes #9537)

Elian Doranb60b74e66ddd
diff --git a/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx b/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx
index c62b538af5..bf25947f8d 100644
--- a/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx
+++ b/apps/client/src/widgets/ribbon/SearchDefinitionOptions.tsx
@@ -8,6 +8,7 @@ import FNote from "../../entities/fnote";
import { removeOwnedAttributesByNameOrType } from "../../services/attributes";
import { t } from "../../services/i18n";
import server from "../../services/server";
+import { openInAppHelpFromUrl } from "../../services/utils";
import Admonition from "../react/Admonition";
import FormSelect from "../react/FormSelect";
import FormTextArea from "../react/FormTextArea";
@@ -165,7 +166,10 @@ function SearchStringOption({ note, refreshResults, error, ...restProps }: Searc
title={t("search_string.title_column")}
className={clsx({ "has-error": !!error })}
help={<>
- <strong>{t("search_string.search_syntax")}</strong> - {t("search_string.also_see")} <a href="#" data-help-page="search.html">{t("search_string.complete_help")}</a>
+ <strong>{t("search_string.search_syntax")}</strong> - {t("search_string.also_see")} <a href="#" onClick={(e) => {
+ e.preventDefault();
+ openInAppHelpFromUrl("eIg8jdvaoNNd");
+ }}>{t("search_string.complete_help")}</a>
<ul style="marigin-bottom: 0;">
<li>{t("search_string.full_text_search")}</li>
<li><code>#abc</code> - {t("search_string.label_abc")}</li>