Skip to content

Commit e3f93c4

Browse files
committed
fix linkparamset dropdown initialization
1 parent 8b1f603 commit e3f93c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

www/js/homematic-manager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3441,7 +3441,7 @@ function formLinkParamset(elem, data, desc, direction, senderType, receiverType)
34413441
}
34423442
for (let i = desc[param].MIN; i <= desc[param].MAX; i++) {
34433443
let optVal = daemon === 'HmIP' ? desc[param].VALUE_LIST[i] : i;
3444-
input += '<option value="' + optVal + '"' + ((data[param] === i || data[param] === desc[param].VALUE_LIST[i]) ? ' selected="selected"' : '') + '>' + desc[param].VALUE_LIST[i] + '</option>';
3444+
input += '<option value="' + optVal + '">' + desc[param].VALUE_LIST[i] + '</option>';
34453445
if (helpentry) {
34463446
if (i === desc[param].MIN) {
34473447
help += '<br/><ul>';
@@ -3499,10 +3499,14 @@ function formLinkParamset(elem, data, desc, direction, senderType, receiverType)
34993499
for (let i = 0; i < resultArr.length; i++) {
35003500
elem.append(resultArr[i].fragment);
35013501
}
3502+
35023503
}
35033504
if (direction === 'receiver-sender') {
35043505
formEasyMode(data, desc, direction, senderType, receiverType, data.UI_HINT);
35053506
}
3507+
elem.find('select').each(function () {
3508+
$(this).children('option:eq(' + $(this).data('val-prev') + ')').attr('selected', 'selected');
3509+
});
35063510
}
35073511
function dialogRemoveLink() {
35083512
const rowId = $gridLinks.jqGrid('getGridParam', 'selrow');

0 commit comments

Comments
 (0)