Skip to content

msg.ui_update clears values in ´text´ node #1892

@Switchblade2

Description

@Switchblade2

Current Behavior

If I send msg.payload and msg.ui_update in one msg to the text node then all is ok.
But if I only send msg.ui_update, it first looks ok, but if the web-page is reloaded, then value in the text field is erased.

it was ok in 1.26.0 but not 1.27.0

Expected Behavior

The value should remain after reloading the webpage

Steps To Reproduce

Test flow:
Click on A to set a value and colour. After Reloading webpage the value will remain (as expected)
Click on B to change the colour. Reloading the webpage will cause the value to disappear.
Click on C to set a new value. After Reloading webpage the value will remain (as expected)
So all is ok if you press A or C, but pressing C and then reloading webpage will cause the issue.
In my normal use case C is sent hourly followed by B if certain conditions are met. So I will often find the text field without value when I open the dashboard.

[ { "id": "9b512d81403d76be", "type": "inject", "z": "27e5b3e5cc7a2679", "name": "B", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 170, "y": 840, "wires": [ [ "0bf7bac0ab238b06" ] ] }, { "id": "429e4c30238f509c", "type": "function", "z": "27e5b3e5cc7a2679", "name": "payload & ui_update", "func": "msg = {}\n\nmsg.payload = (6.669).toFixed(1);\nmsg.ui_update = { color: \"#66cd00\" }\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 800, "wires": [ [ "c0221554f3a9397b" ] ] }, { "id": "c0221554f3a9397b", "type": "ui-text", "z": "27e5b3e5cc7a2679", "group": "e1c6e6cb771c2108", "order": 3, "width": "2", "height": "1", "name": "kWh price", "label": "¢/kWh prices", "format": "{{msg.payload}}", "layout": "col-center", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "14", "color": "#717171", "wrapText": false, "className": "", "value": "payload", "valueType": "msg", "x": 620, "y": 840, "wires": [] }, { "id": "f465a9ea7844b18b", "type": "inject", "z": "27e5b3e5cc7a2679", "name": "A", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 170, "y": 800, "wires": [ [ "429e4c30238f509c" ] ] }, { "id": "0bf7bac0ab238b06", "type": "function", "z": "27e5b3e5cc7a2679", "name": "ui_update", "func": "msg = {}\n\nmsg.ui_update = { color: \"#E67E22\"} \n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 320, "y": 840, "wires": [ [ "c0221554f3a9397b" ] ] }, { "id": "c488230ad9e3768c", "type": "function", "z": "27e5b3e5cc7a2679", "name": "payload", "func": "msg = {}\n\nmsg.payload = (1.669).toFixed(1);\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 320, "y": 880, "wires": [ [ "c0221554f3a9397b" ] ] }, { "id": "e611cf750224745d", "type": "inject", "z": "27e5b3e5cc7a2679", "name": "C", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 170, "y": 880, "wires": [ [ "c488230ad9e3768c" ] ] }, { "id": "e1c6e6cb771c2108", "type": "ui-group", "name": "test", "page": "cf478244c05a3ad7", "width": "3", "height": 1, "order": 1, "showTitle": false, "className": "", "visible": "true", "disabled": "false", "groupType": "default" }, { "id": "cf478244c05a3ad7", "type": "ui-page", "name": "Tasks", "ui": "8071e69eb67e4e66", "path": "/page1", "icon": "home", "layout": "grid", "theme": "6cf98fc8cedde7c6", "breakpoints": [ { "name": "Default", "px": "0", "cols": "3" }, { "name": "Tablet", "px": "576", "cols": "6" }, { "name": "Desktop", "px": "1024", "cols": "12" } ], "order": 11, "className": "", "visible": "true", "disabled": "false" }, { "id": "8071e69eb67e4e66", "type": "ui-base", "name": "Tamariu", "path": "/dashboard", "appIcon": "", "includeClientData": false, "acceptsClientConfig": [ "ui-control", "ui-notification" ], "showPathInSidebar": false, "headerContent": "dashboard", "navigationStyle": "temporary", "titleBarStyle": "default", "showReconnectNotification": false, "notificationDisplayTime": 5, "showDisconnectNotification": false, "allowInstall": true }, { "id": "6cf98fc8cedde7c6", "type": "ui-theme", "name": "Green", "colors": { "surface": "#ffffff", "primary": "#01bb0c", "bgPage": "#eeeeee", "groupBg": "#ffffff", "groupOutline": "#b1dd8c" }, "sizes": { "density": "comfortable", "pagePadding": "12px", "groupGap": "12px", "groupBorderRadius": "9px", "widgetGap": "18px" } } ]

Environment

  • Dashboard version: 1.28.0
  • Node-RED version: 4.0.8
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNeeds looking at to decide what to do

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions