mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
Fixed default value bug in dropdowns inside domain server settings
This commit is contained in:
parent
6c2134901e
commit
0fa172a4ef
2 changed files with 9 additions and 5 deletions
|
@ -1362,6 +1362,7 @@
|
|||
"label": "Server Type",
|
||||
"type": "select",
|
||||
"placeholder": "Audio Mixer",
|
||||
"default": "Audio Mixer",
|
||||
"can_set": true,
|
||||
"options": [
|
||||
{
|
||||
|
|
|
@ -1299,7 +1299,7 @@ function makeTableHiddenInputs(setting, initialValues, categoryValue) {
|
|||
}
|
||||
|
||||
html += "</select>";
|
||||
html += "<input type='hidden' class='table-dropdown form-control trigger-change' name='" + col.name + "' value='" + option.value + "'></td>";
|
||||
html += "<input type='hidden' class='table-dropdown form-control trigger-change' name='" + col.name + "' value='" + defaultValue + "'></td>";
|
||||
} else {
|
||||
html +=
|
||||
"<td " + (col.hidden ? "style='display: none;'" : "") + " class='" + Settings.DATA_COL_CLASS + "' " +
|
||||
|
@ -1442,7 +1442,10 @@ function addTableRow(row) {
|
|||
input.attr("name", newName)
|
||||
} else {
|
||||
if (isDropdown) {
|
||||
$(element).children("select").attr("data-hidden-input", newName);
|
||||
// default values for hidden inputs inside child selects gets cleared so we need to remind it
|
||||
var selectElement = $(element).children("select");
|
||||
selectElement.attr("data-hidden-input", newName);
|
||||
$(element).children("input").val(selectElement.val());
|
||||
}
|
||||
input.attr("name", newName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue