forked from coracle/flotilla
Support copying and pasting npubs better
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
const image = new Image()
|
||||
|
||||
image.addEventListener("error", () => {
|
||||
element.querySelector(".hidden")?.classList.remove("hidden")
|
||||
element?.querySelector(".hidden")?.classList.remove("hidden")
|
||||
})
|
||||
|
||||
image.src = src
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {throttle, clamp} from "@welshman/lib"
|
||||
import {preventDefault, stopPropagation} from "@lib/html"
|
||||
|
||||
const {term, search, select, component: Component, allowCreate = false} = $props()
|
||||
const {term, search, select, component: Component, style = "", allowCreate = false} = $props()
|
||||
|
||||
let index = $state(0)
|
||||
let items: string[] = $state([])
|
||||
@@ -57,7 +57,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions">
|
||||
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions" {style}>
|
||||
<div class="tiptap-suggestions__content max-h-[40vh]">
|
||||
{#if $term && allowCreate && !items.includes($term)}
|
||||
<button
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
...restProps
|
||||
} = $props()
|
||||
|
||||
const reactiveProps = $derived(props)
|
||||
|
||||
let element: Element
|
||||
|
||||
onMount(() => {
|
||||
@@ -28,7 +26,7 @@
|
||||
...params,
|
||||
})
|
||||
|
||||
instance = mount(component, {target, props: reactiveProps})
|
||||
instance = mount(component, {target, props})
|
||||
|
||||
return () => {
|
||||
popover?.destroy()
|
||||
|
||||
Reference in New Issue
Block a user