MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / createSelect

Method createSelect

ts/menu_ts.ts:1292–1310  ·  view source on GitHub ↗
(text: string[], values: string[], set: string, dbKey: string)

Source from the content-addressed store, hash-verified

1290 }
1291
1292 createSelect(text: string[], values: string[], set: string, dbKey: string): any {
1293 var select = document.createElement("SELECT")
1294 select.setAttribute("name", dbKey)
1295 for (let i = 0; i < text.length; i++) {
1296 var option = document.createElement("OPTION")
1297 option.setAttribute("value", values[i])
1298 option.innerText = text[i]
1299 select.appendChild(option)
1300 }
1301 if (set != "") {
1302 (select as HTMLSelectElement).value = set
1303 }
1304
1305 if (set == undefined) {
1306 (select as HTMLSelectElement).value = values[0]
1307 }
1308
1309 return select
1310 }
1311
1312 selectOption(select: any, value: string): any {
1313 //select.selectedOptions = value

Callers 3

createSettingsMethod · 0.95
createWizardMethod · 0.95
openPopUpFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected