Skip to content

Commit

Permalink
Fix dropdown to return values not labels...
Browse files Browse the repository at this point in the history
ooops
  • Loading branch information
Dave Conway-Jones committed Aug 7, 2020
1 parent 8745c32 commit 6b26c28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### 2.23.1: Maintenance Release
### 2.23.2: Maintenance Release

**Fixes**

- Fix dropdown to correct return values not labels

### 2.23.1: Maintenance Release

**Fixes**

Expand Down
2 changes: 1 addition & 1 deletion dist/dashboard.appcache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Time: Fri Aug 07 2020 14:44:32 GMT+0100 (British Summer Time)
# Time: Fri Aug 07 2020 15:58:17 GMT+0100 (British Summer Time)

CACHE:
i18n.js
Expand Down
4 changes: 2 additions & 2 deletions nodes/ui_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ module.exports = function(RED) {
var val = node.multiple ? [] : "";
for (var i=0; i<control.options.length; i++) {
if (!node.multiple && control.options[i].value === msg) {
val = control.options[i].label;
val = control.options[i].value;
break;
} else if (node.multiple && Array.isArray(msg) && msg.indexOf(control.options[i].value) !== -1) {
val.push(control.options[i].label);
val.push(control.options[i].value);
}
}
return val;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-dashboard",
"version": "2.23.1",
"version": "2.23.2",
"description": "A set of dashboard nodes for Node-RED",
"keywords": [
"node-red"
Expand Down

0 comments on commit 6b26c28

Please sign in to comment.