diff --git a/cypress/fixtures/flows/dashboard-tables.json b/cypress/fixtures/flows/dashboard-tables.json index 0bd3c3ea5..8e4ea40d9 100644 --- a/cypress/fixtures/flows/dashboard-tables.json +++ b/cypress/fixtures/flows/dashboard-tables.json @@ -24,6 +24,7 @@ "group": "dashboard-ui-group", "name": "Default", "label": "text", + "action": "replace", "order": 0, "width": 0, "height": 0, @@ -77,6 +78,7 @@ "group": "dashboard-ui-group", "name": "Max Rows: 2", "label": "text", + "action": "replace", "order": 0, "width": 0, "height": 0, @@ -100,6 +102,7 @@ "group": "dashboard-ui-group", "name": "Single Row Selection", "label": "text", + "action": "replace", "order": 0, "width": 0, "height": 0, @@ -123,6 +126,7 @@ "group": "dashboard-ui-group", "name": "Single Row Selection", "label": "text", + "action": "replace", "order": 0, "width": 0, "height": 0, @@ -146,6 +150,7 @@ "group": "dashboard-ui-group", "name": "dashboard-ui-table-table-buttons-string-value", "label": "dashboard-ui-table-table-buttons-string-value", + "action": "replace", "order": 0, "width": 0, "height": 0, @@ -195,6 +200,7 @@ "group": "dashboard-ui-group", "name": "dashboard-ui-table-buttons-text-from-payload", "label": "text", + "action": "replace", "order": 0, "width": 0, "height": 0, diff --git a/nodes/widgets/ui_table.js b/nodes/widgets/ui_table.js index aa25226c9..fe6876075 100644 --- a/nodes/widgets/ui_table.js +++ b/nodes/widgets/ui_table.js @@ -27,6 +27,10 @@ module.exports = function (RED) { }) } + if (!config.action || typeof config.action === 'undefined') { + config.action = 'append' + } + // inform the dashboard UI that we are adding this node group.register(node, config, { onAction: true,