Refreshing ui_table

When I click twice on the Error button, why does it show only one entry in the table, and after a manual refresh, why does it show both entries?
How to fix it?

[{"id":"471994f81dc05b58","type":"ui_table","z":"8d0978fa5349c413","group":"group-id","name":"MessagesTable","order":22,"width":"0","height":"0","columns":[{"field":"timestamp","title":"Date / Time","width":"","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"message","title":"Message","width":"","align":"center","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":800,"y":480,"wires":[]},{"id":"345ff202eb8658fd","type":"debug","z":"8d0978fa5349c413","name":"debug 2521","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":780,"y":520,"wires":[]},{"id":"8aa0b57b96b18d73","type":"function","z":"8d0978fa5349c413","name":"updateTable","func":"var timestamp = new Date().getTime();\nvar date = new Date(timestamp);\nvar readableDate = date.toLocaleString();\n\nvar messageContent = \"Error\";\n\nvar newRow = {\n    timestamp: readableDate,\n    message: messageContent\n};\n\nvar messages = flow.get('messages') || [];\n\nmessages.unshift(newRow);\n\nif (messages.length > 5) {\n    messages.length = 5;\n}\n\nflow.set('messages', messages);\n\nmsg.payload = messages;\n\nvar controlMsg = {ui_control: {callback: \"update\"}};\ndelete msg.socketid\nreturn [msg, controlMsg];","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":520,"wires":[["471994f81dc05b58","345ff202eb8658fd"]]},{"id":"43ed59b3babe136a","type":"function","z":"8d0978fa5349c413","name":"resetTable","func":"flow.set('messages', []);\nmsg.payload = [];\ndelete msg.socketid\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":480,"wires":[["471994f81dc05b58"]]},{"id":"634583e49ca39726","type":"link in","z":"8d0978fa5349c413","name":"link in 4","links":["3e9c8b726253b695"],"x":455,"y":520,"wires":[["8aa0b57b96b18d73"]]},{"id":"e39debd06002e510","type":"ui_template","z":"8d0978fa5349c413","group":"group-id","name":"Reset","order":10,"width":3,"height":1,"format":"<md-button class=\"vibrate filled touched smallfont rounded\" style=\"background-color:#616A6B\"   ng-click=\"send({payload: 'Hello World'})\"> \n    Reset<br/>\n</md-button> \n\n","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":430,"y":480,"wires":[["43ed59b3babe136a"]]},{"id":"8365569f07a9e36f","type":"ui_template","z":"8d0978fa5349c413","group":"group-id","name":"Error","order":2,"width":3,"height":3,"format":"<md-button class=\"vibrate filled touched bigfont rounded\" style=\"background-color:#c0392b\" ng-click=\"send({payload: 2})\"> \n    Error<br/>\n</md-button> \n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":210,"y":520,"wires":[["3e9c8b726253b695"]]},{"id":"3e9c8b726253b695","type":"link out","z":"8d0978fa5349c413","name":"link out 6","mode":"link","links":["634583e49ca39726"],"x":305,"y":520,"wires":[]},{"id":"group-id","type":"ui_group","name":"Default","tab":"tab-id","order":1,"disp":true,"width":"6","collapse":false},{"id":"tab-id","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Have you looked at the ui-table examples, you will find them in editor.
Press ctrl I > examples > ui-table
Take a look at commands on how to add a row.

Did you mean the example on that site?

Ctrl+i or Ctrl+L seems not to be working properly (is it 'i' or 'L'?).
Additionally, I have implemented that function (to add row), but it appears not to solve my problem.

var controlMsg = {
    ui_control: {
        callback: 'update',
        tabulator: {
            addRow: newRow
        }
    }
};

No, in the node-red flow editor press control I or select import in the side menu


The command flow has examples of adding rows.

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