1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 11:20:19 +00:00

Preselect the right option in the select-input

This commit is contained in:
Christian Riggenbach
2019-03-06 00:18:19 +01:00
parent d0c59ac659
commit b987828a25
10 changed files with 19 additions and 10 deletions

2
data/js/controls.js vendored
View File

@ -512,7 +512,7 @@ function start() {
if(data.parentControl) {
var element = $("#select"+data.parentControl);
element.append(
"<option id='option" + data.id + "' value='" + data.value + "'>" + data.label + "</option>"
"<option id='option" + data.id + "' value='" + data.value + "' " + data.selected + ">" + data.label + "</option>"
);
}
break;