working on task members
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
import { t } from '../translations.svelte.js'
|
||||
import { tick } from "svelte";
|
||||
|
||||
let { getOptionsFor = text => {}, onSelect = text => [] } = $props();
|
||||
let {
|
||||
getCandidates = text => {},
|
||||
onSelect = text => []
|
||||
} = $props();
|
||||
|
||||
let text = $state('')
|
||||
let options = $state({});
|
||||
@@ -35,7 +38,8 @@
|
||||
} else if (key.length<2){
|
||||
text += evt.key
|
||||
}
|
||||
options = await getOptionsFor(text);
|
||||
options = await getCandidates(text);
|
||||
console.log({options:options})
|
||||
await tick();
|
||||
for (let o of select.getElementsByTagName('option')) o.selected = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user