process_loop_fix
This commit is contained in:
parent
b539bb8fee
commit
1f4f9c2208
@ -36,15 +36,10 @@ export async function init() {
|
|||||||
search_div.appendChild(autocomplete_list);
|
search_div.appendChild(autocomplete_list);
|
||||||
search_div.appendChild(dropdown_icon);
|
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();
|
const processes = await getProcesses();
|
||||||
for (const {key, value} of processes) {
|
for (const {key, value} of processes) {
|
||||||
const processName = await getDescription(key, value);
|
const processName = await getDescription(key, value);
|
||||||
// const processName = value['description'];
|
|
||||||
if (processName) {
|
if (processName) {
|
||||||
console.log('adding process name to list:', processName);
|
console.log('adding process name to list:', processName);
|
||||||
const opt = new Option(processName);
|
const opt = new Option(processName);
|
||||||
@ -52,7 +47,7 @@ export async function init() {
|
|||||||
element.add(opt);
|
element.add(opt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
|
||||||
// set the wrapper as child (instead of the element)
|
// set the wrapper as child (instead of the element)
|
||||||
element.parentNode?.replaceChild(wrapper, element);
|
element.parentNode?.replaceChild(wrapper, element);
|
||||||
// set element as child of wrapper
|
// set element as child of wrapper
|
||||||
@ -60,15 +55,6 @@ export async function init() {
|
|||||||
wrapper.appendChild(search_div);
|
wrapper.appendChild(search_div);
|
||||||
|
|
||||||
addPlaceholder(wrapper);
|
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) {
|
function removePlaceholder(wrapper: HTMLElement) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user