mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
refactor(react): get rid of jQuery in static tooltip
This commit is contained in:
parent
641c6f4595
commit
f87d270caa
@ -535,11 +535,8 @@ export function useStaticTooltip(elRef: RefObject<Element>, config?: Partial<Too
|
||||
const 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 ]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user