implemented sharing of bookmarks
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { tick } from "svelte";
|
||||
|
||||
let {
|
||||
getCandidates = text => {},
|
||||
getCandidates = async text => { conole.log('no handler for getCandidates('+text+')'); return {};},
|
||||
onSelect = text => []
|
||||
} = $props();
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
let result = {};
|
||||
result[key] = text;
|
||||
options = {};
|
||||
text = '';
|
||||
onSelect(result);
|
||||
}
|
||||
|
||||
@@ -49,10 +50,11 @@
|
||||
min-width: 200px;
|
||||
}
|
||||
</style>
|
||||
<select size={Object.keys(options).length<2?2:Object.keys(options).length+1} {onkeyup} {ondblclick} autofocus width="40">
|
||||
{#if options}
|
||||
<select size={Object.keys(options).length<2?2:Object.keys(options).length+1} {onkeyup} {ondblclick} width="40">
|
||||
<option>{text}</option>
|
||||
{#each Object.entries(options) as [val,caption]}
|
||||
<option value={val}>{caption}</option>
|
||||
{/each}
|
||||
</select>
|
||||
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user