switch: display choice value names when values are defined with an array
This commit is contained in:
parent
3edc282ed3
commit
1509fb0066
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ module.exports = class Switch extends _widgets_base {
|
|||
|
||||
for (var k in widgetData.values) {
|
||||
this.values.push(widgetData.values[k])
|
||||
$('<div class="value">'+k+'</div>').data({value:widgetData.values[k]}).appendTo(this.widget)
|
||||
$(`<div class="value">${parseFloat(k) != k ? k : widgetData.values[k]}</div>`).data({value:widgetData.values[k]}).appendTo(this.widget)
|
||||
}
|
||||
|
||||
this.value = undefined
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue