mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	refactor(react): get rid of jQuery in static tooltip
This commit is contained in:
		| @@ -535,11 +535,8 @@ export function useStaticTooltip(elRef: RefObject<Element>, config?: Partial<Too | |||||||
|         const hasTooltip = config?.title || elRef.current?.getAttribute("title"); |         const hasTooltip = config?.title || elRef.current?.getAttribute("title"); | ||||||
|         if (!elRef?.current || !hasTooltip) return; |         if (!elRef?.current || !hasTooltip) return; | ||||||
|  |  | ||||||
|         const $el = $(elRef.current); |         const tooltip = Tooltip.getOrCreateInstance(elRef.current, config); | ||||||
|         $el.tooltip(config); |         return () => tooltip.dispose(); | ||||||
|         return () => { |  | ||||||
|             $el.tooltip("dispose"); |  | ||||||
|         } |  | ||||||
|     }, [ elRef, config ]); |     }, [ elRef, config ]); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user