From 9c58dfc1c854aec40edd713a54634df63c2cbaff Mon Sep 17 00:00:00 2001 From: Sebastian Waldvogel Date: Sun, 5 Feb 2023 22:19:52 +0100 Subject: [PATCH] Release 1.1.1 --- CHANGELOG.md | 19 +++++++++++++++++++ nodes/persistent-value.html | 6 +++--- package.json | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1b9f7..1789969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file. + +## [1.1.1] - 2023-02-05 + +### Fixes +- Selected value is lost if the configured value is renamed. + + **Background:** + + Instead of the value name an UUID is now used to identify the selected value. + + **Migration Steps:** + + Old configurations without the UUID can still be loaded, + but value renaming is not working without the following migration steps: + + - Open all existing persistent values config nodes and press 'Update' + - Open all persistent value nodes and press 'Done'. + - For now on the selected value should be automatically updated even if the value got renamed. + ## [1.1.0] - 2023-02-02 ### Features diff --git a/nodes/persistent-value.html b/nodes/persistent-value.html index 1797f49..ef28648 100644 --- a/nodes/persistent-value.html +++ b/nodes/persistent-value.html @@ -111,9 +111,9 @@ // Ignore re-population change if (selected.val() !== undefined) { // Store actual selected value ID and name - const selected_id = selected.data('id'); - if(selected_id !== 'undefined') { - node.valueId = selected_id; + const selectedId = selected.data('id'); + if(selectedId !== 'undefined') { + node.valueId = selectedId; valueIdField.val(node.valueId); } diff --git a/package.json b/package.json index 4863792..b653871 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@waldbaer/node-red-persistent-values", - "version": "1.1.0", + "version": "1.1.1", "description": "Persistent values for Node-RED", "author": "waldbaer", "license": "MIT",