Help! node-red-node-ui-table rowSelected callback not working for me

I am trying to get rowSelection callbacks working when using node-red-node-ui-table. I currently have columnMoved callbacks working as per example 3 of the node. But using that as a template I cannot get the rowSelected callback to trigger. Can anyone help me with find what I am doing wrong.

Here is the relevant line from the change node I use to setup the table.

"rowSelected": "function(row_selected){ this.send({topic:this.config.topic,ui_control:{callback:'rowSelected',row:row_selected}}); }",

Here is the full JSON.

{
    "tabulator": {
        "rowSelected": "function(row_selected){ this.send({topic:this.config.topic,ui_control:{callback:'rowSelected',row:row_selected}}); }",
        "layout": "fitColumns",
        "selectable": 1,
        "columns": [
            {
                "formatter": "rowSelection",
                "align": "center",
                "width": "2%",
                "headerSort": false
            },
            {
                "title": "Torque",
                "field": "torque",
                "editor": "number",
                "editorParams": {
                    "step": 0.1
                }
            },
            {
                "title": "Duration",
                "field": "duration",
                "editor": "number"
            }
        ]
    },
    "customHeight": 12
}

Here is an export of the node.

[{"id":"845329d3.eb6ed","type":"change","z":"76e403d6.61e914","name":"Setup Tabulator","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"rowSelected\":\"function(row_selected){ this.send({topic:this.config.topic,ui_control:{callback:'rowSelected',row:row_selected}}); }\",\"layout\":\"fitColumns\",\"selectable\":1,\"columns\":[{\"formatter\":\"rowSelection\",\"align\":\"center\",\"width\":\"2%\",\"headerSort\":false},{\"title\":\"Torque\",\"field\":\"torque\",\"editor\":\"number\",\"editorParams\":{\"step\":0.1}},{\"title\":\"Duration\",\"field\":\"duration\",\"editor\":\"number\"}]},\"customHeight\":12}","tot":"json"},{"t":"set","p":"payload","pt":"msg","to":"[{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10},{\"torque\":1,\"duration\":10}]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":100,"wires":[["b0495229.d891d8","840cb515.88f298"]]}]

I am using a rowSelection formatter column to set the selections.

I cannot spot what I have done wrong. All help gratefully received.

Roger

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