fix: tooltip
This commit is contained in:
1 parent
63c0927022
commit
f9482275f2
1 file changed
+8
-7
@@ -10,18 +10,19 @@
|
||||
|
||||
$: if (tooltipElement && content) {
|
||||
if (tooltipInstance) {
|
||||
tooltipInstance[0]?.destroy();
|
||||
tooltipInstance.setContent(content);
|
||||
} else {
|
||||
tooltipInstance = tippy(tooltipElement, {
|
||||
content: content,
|
||||
placement: placement,
|
||||
allowHTML: true
|
||||
});
|
||||
}
|
||||
tooltipInstance = tippy(tooltipElement, {
|
||||
content: content,
|
||||
placement: placement,
|
||||
allowHTML: true
|
||||
});
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
if (tooltipInstance) {
|
||||
tooltipInstance[0]?.destroy();
|
||||
tooltipInstance.destroy();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user