--- a/svghmi/widget_dropdown.ysl2 Tue Apr 14 17:16:25 2020 +0200
+++ b/svghmi/widget_dropdown.ysl2 Tue Apr 14 17:17:35 2020 +0200
@@ -25,7 +25,9 @@
on_selection_click: function(selection) {
console.log("selected "+selection);
this.close();
- this.set_selection(selection);
+ let orig = this.indexes[0];
+ let idx = this.offset ? orig - this.offset : orig;
+ apply_hmi_value(idx, selection);
},
on_button_click: function() {
this.open();
@@ -83,6 +85,7 @@
this.reset_text();
this.reset_box();
this.element.appendChild(this.button_elt);
+ this.apply_cache();
document.removeEventListener("click", this.bound_inhibit_click_elsewhere, true);
this.opened = false;
},