# Table diseappear

**URL:** https://discourse.nodered.org/t/table-diseappear/79044
**Category:** Dashboard
**Tags:** node-red-dashboard
**Created:** [8 June 2023 06:43 UTC](https://discourse.nodered.org/t/table-diseappear/79044 "2023-06-08T06:43:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Marchal-web](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marchal-web/32/66937_2.png) [@Marchal-web](https://discourse.nodered.org/u/Marchal-web)
#### Post date: [8 June 2023 06:43 UTC](https://discourse.nodered.org/t/table-diseappear/79044/1 "2023-06-08T06:43:52Z")

</div>

Hello,  
I had created a table with button in rows.  
The button send the name of the first cell of the selected row  
I'm facing an issue with this code below. when I press the button I get the payload with right value, but the table diseappear.  
I'm not an html expert, any idea about what's going wrong ?

```auto
[
    {
        "id": "193110f5d82adc19",
        "type": "ui_template",
        "z": "b8410c8ad6d1ccb1",
        "group": "623131314aba8708",
        "name": "Table",
        "order": 1,
        "width": 0,
        "height": 0,
        "format": "<style>\n table {\n border-spacing: 0;\n width: 100%;\n border: 1px solid #ddd;\n }\n\n th {\n cursor: pointer;\n }\n\n th,\n td {\n text-align: left;\n padding: 16px;\n }\n\n tr:nth-child(even) {\n background-color: #f2f2f2\n }\n</style>\n<script>\n var value = \"hello world\";\n // or overwrite value in your callback function ...\n this.scope.action2 = function(el) { return el.file; }\n this.scope.action = function(el) { return value; }\n</script>\n\n<table id=\"myTable\">\n <tr>\n <th>file</th>\n <th>size</th>\n <th>size2</th>\n </tr>\n <tr ng-repeat=\"obj in msg.payload\">\n <td>{{obj.file}}</td>\n <td>{{obj.size}}</td>\n <td><button ng-click=\"send({payload:action2(obj)})\"> action </button></td>\n </tr>\n</table>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 270,
        "y": 100,
        "wires": [
            [
                "390471e58414168a"
            ]
        ]
    },
    {
        "id": "390471e58414168a",
        "type": "debug",
        "z": "b8410c8ad6d1ccb1",
        "name": "debug 257",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 470,
        "y": 100,
        "wires": []
    },
    {
        "id": "7e56d20ac7fb150c",
        "type": "inject",
        "z": "b8410c8ad6d1ccb1",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[{\"file\":\"value1\",\"size\":\"value2\"}, {\"file\":\"value3\",\"size\":\"value4\"}, {\"file\":\"value5\",\"size\":\"value6\"}, {\"file\":\"value7\",\"size\":\"value8\"}, {\"file\":\"value9\",\"size\":\"value10\"}, {\"file\":\"value11\",\"size\":\"value12\"}]",
        "payloadType": "json",
        "x": 110,
        "y": 100,
        "wires": [
            [
                "193110f5d82adc19"
            ]
        ]
    },
    {
        "id": "623131314aba8708",
        "type": "ui_group",
        "name": "list",
        "tab": "6cdb0c33ce269daf",
        "order": 1,
        "disp": false,
        "width": "22",
        "collapse": false,
        "className": ""
    },
    {
        "id": "6cdb0c33ce269daf",
        "type": "ui_tab",
        "name": "Files",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [8 June 2023 06:54 UTC](https://discourse.nodered.org/t/table-diseappear/79044/2 "2023-06-08T06:54:35Z")

</div>

Try deselecting `Add output messages to stored state`.

 ![chrome_screenshot_1686207129913](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cf315bf19a6ad174893b952be9eb3caba8b3c443.png)

---

<div class="post-metadata">

### Author: ![Marchal-web](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marchal-web/32/66937_2.png) [@Marchal-web](https://discourse.nodered.org/u/Marchal-web)
#### Post date: [8 June 2023 07:36 UTC](https://discourse.nodered.org/t/table-diseappear/79044/3 "2023-06-08T07:36:59Z")

</div>

Thanks, the 3 option was selected.  
It seems to work with only 'reload last value on refresh' and "`Add output to stored state" deselected.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 June 2023 07:37 UTC](https://discourse.nodered.org/t/table-diseappear/79044/4 "2023-06-22T07:37:51Z")

</div>

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