Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
f9482275
Commit
f9482275
authored
Mar 02, 2024
by
Timothy J. Baek
Browse files
fix: tooltip
parent
63c09270
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
src/lib/components/common/Tooltip.svelte
src/lib/components/common/Tooltip.svelte
+8
-7
No files found.
src/lib/components/common/Tooltip.svelte
View file @
f9482275
...
@@ -10,18 +10,19 @@
...
@@ -10,18 +10,19 @@
$: if (tooltipElement && content) {
$: if (tooltipElement && content) {
if (tooltipInstance) {
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(() => {
onDestroy(() => {
if (tooltipInstance) {
if (tooltipInstance) {
tooltipInstance
[0]?
.destroy();
tooltipInstance.destroy();
}
}
});
});
</script>
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment