Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(react): get rid of jQuery in static tooltip
Elian Doranf87d270caa2a
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex a1f06eeac1..9e6991f084 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -535,11 +535,8 @@ export function useStaticTooltip(elRef: RefObject<Element>, config?: Partial<Tooconst hasTooltip = config?.title || elRef.current?.getAttribute("title");if (!elRef?.current || !hasTooltip) return;- const $el = $(elRef.current);- $el.tooltip(config);- return () => {- $el.tooltip("dispose");- }+ const tooltip = Tooltip.getOrCreateInstance(elRef.current, config);+ return () => tooltip.dispose();}, [ elRef, config ]);}