process_loop_fix
This commit is contained in:
parent
b539bb8fee
commit
1f4f9c2208
@ -36,23 +36,18 @@ export async function init() {
|
||||
search_div.appendChild(autocomplete_list);
|
||||
search_div.appendChild(dropdown_icon);
|
||||
|
||||
// This is temporary
|
||||
// Create a new process with hardcoded members for demonstration purpose
|
||||
await createMessagingProcess();
|
||||
|
||||
setTimeout(async () => {
|
||||
const processes = await getProcesses();
|
||||
for (const {key, value} of processes) {
|
||||
const processName = await getDescription(key, value);
|
||||
// const processName = value['description'];
|
||||
if (processName) {
|
||||
console.log('adding process name to list:', processName);
|
||||
const opt = new Option(processName);
|
||||
opt.value = processName;
|
||||
element.add(opt);
|
||||
}
|
||||
const processes = await getProcesses();
|
||||
for (const {key, value} of processes) {
|
||||
const processName = await getDescription(key, value);
|
||||
if (processName) {
|
||||
console.log('adding process name to list:', processName);
|
||||
const opt = new Option(processName);
|
||||
opt.value = processName;
|
||||
element.add(opt);
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
// set the wrapper as child (instead of the element)
|
||||
element.parentNode?.replaceChild(wrapper, element);
|
||||
// set element as child of wrapper
|
||||
@ -60,15 +55,6 @@ export async function init() {
|
||||
wrapper.appendChild(search_div);
|
||||
|
||||
addPlaceholder(wrapper);
|
||||
|
||||
// const select = document.querySelector(".select-field");
|
||||
// for (const process of processeList) {
|
||||
// const option = document.createElement("option");
|
||||
// option.setAttribute("value", process.name);
|
||||
// option.innerText = process.name;
|
||||
|
||||
// select.appendChild(option);
|
||||
// }
|
||||
}
|
||||
|
||||
function removePlaceholder(wrapper: HTMLElement) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user