Dashboard 2.0 : Dropdown node need to be cleared

I am using a dropdown node to select shift. however after pressing the save button, I want to clear the selction at the drop down node. I tried to pass msg.payload = null but it does not work. in the dashboard, it still shows previous selection. I want to show 'Select Shift' in the dropdown and pass a msg.payload = null to the output of dropdown node.
my code is as below:

[
    {
        "id": "33d5a5a39b383424",
        "type": "ui-dropdown",
        "z": "05dd723f51490e40",
        "group": "a007140ec55da7a5",
        "name": "",
        "label": "Shift",
        "tooltip": "",
        "order": 2,
        "width": "2",
        "height": "1",
        "passthru": true,
        "multiple": false,
        "chips": false,
        "clearable": true,
        "options": [
            {
                "label": "A",
                "value": "A",
                "type": "str"
            },
            {
                "label": "B",
                "value": "B",
                "type": "str"
            },
            {
                "label": "Select Shift",
                "value": "Select Shift",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "payload",
        "topicType": "msg",
        "className": "",
        "typeIsComboBox": true,
        "x": 710,
        "y": 200,
        "wires": [
            [
                "711201ad1a52fadb"
            ]
        ]
    },
    {
        "id": "eadd5370ec363606",
        "type": "inject",
        "z": "05dd723f51490e40",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "null",
        "payloadType": "jsonata",
        "x": 310,
        "y": 200,
        "wires": [
            [
                "33d5a5a39b383424"
            ]
        ]
    },
    {
        "id": "29cba5f87d239c94",
        "type": "function",
        "z": "05dd723f51490e40",
        "name": "function 183",
        "func": "msg.payload = null\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 260,
        "wires": [
            [
                "33d5a5a39b383424"
            ]
        ]
    },
    {
        "id": "ec06a3a899207f40",
        "type": "ui-button",
        "z": "05dd723f51490e40",
        "group": "a007140ec55da7a5",
        "name": "",
        "label": "SAVE",
        "order": 8,
        "width": "1",
        "height": "1",
        "emulateClick": false,
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "iconPosition": "left",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "buttonColor": "green",
        "textColor": "white",
        "iconColor": "",
        "x": 390,
        "y": 260,
        "wires": [
            [
                "29cba5f87d239c94"
            ]
        ]
    },
    {
        "id": "a007140ec55da7a5",
        "type": "ui-group",
        "name": "New Plan",
        "page": "68dd494046ff8789",
        "width": "12",
        "height": "1",
        "order": 1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "68dd494046ff8789",
        "type": "ui-page",
        "name": "Production Plan",
        "ui": "fa94e575fc8479f9",
        "path": "/productionplan",
        "icon": "home",
        "layout": "grid",
        "theme": "e384268359403859",
        "order": 3,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "fa94e575fc8479f9",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "showPageTitle": true,
        "navigationStyle": "default",
        "titleBarStyle": "default"
    },
    {
        "id": "e384268359403859",
        "type": "ui-theme",
        "name": "Default Theme",
        "colors": {
            "surface": "#ffffff",
            "primary": "#0094CE",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    }
]

node red version: v3.1.8
dashboard2.0 node version: 3.6.5

please hep me on this.

Scratch that, i miss read your question.
I see no way to do this.
Maybe check nodes github page and if no feature request or issue raise about this, raise one.
@joepavitt is it possible to reset/ delete the select dynamically?

[edit]
Ok it is possible you have to send.
From help text

To clear any selection for a dropdown, pass an empty array [] as msg.payload.

{"payload": []}

e.g.

[{"id":"51587e11e529df89","type":"ui-dropdown","z":"d1395164b4eec73e","group":"a007140ec55da7a5","name":"","label":"Shift","tooltip":"","order":1,"width":"2","height":"1","passthru":true,"multiple":false,"chips":false,"clearable":true,"options":[{"label":"A","value":"A","type":"str"},{"label":"B","value":"B","type":"str"}],"payload":"","topic":"payload","topicType":"msg","className":"","typeIsComboBox":true,"x":650,"y":100,"wires":[[]]},{"id":"44381009169d1a71","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[]","payloadType":"json","x":190,"y":100,"wires":[["51587e11e529df89"]]},{"id":"a007140ec55da7a5","type":"ui-group","name":"New Plan","page":"68dd494046ff8789","width":"12","height":"1","order":1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"68dd494046ff8789","type":"ui-page","name":"Production Plan","ui":"1805777f90e92057","path":"/productionplan","icon":"home","layout":"grid","theme":"e384268359403859","order":3,"className":"","visible":"true","disabled":"false"},{"id":"1805777f90e92057","type":"ui-base","name":"dashboard","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false},{"id":"e384268359403859","type":"ui-theme","name":"Default Theme","colors":{"surface":"#ffffff","primary":"#0094CE","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"density":"default","pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]
1 Like

Thank you. It saved lot of efforts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.