# Ui-table: options how - example no header

**URL:** https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252
**Category:** Dashboard
**Created:** [17 July 2020 07:36 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252 "2020-07-17T07:36:35Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [17 July 2020 07:36 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/1 "2020-07-17T07:36:35Z")

</div>

I would like to format a table created with `node-red-node-ui-table` but struggle with the `ui_control` "Tabulator" property.  
How to use that?

In the following example I try to hide the header but it does not work.  
What's wrong with the flow?

I get the error message `TypeError: Cannot read property 'length' of undefined` in MS Edge console window.

```auto
[{"id":"fe9a0b2e.d3c5e8","type":"inject","z":"62cdb70e.b8cc78","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"name\":\"name1\",\"room\":\"room1\"},{\"name\":\"name2\",\"room\":\"room2\"}]","payloadType":"json","x":510,"y":680,"wires":[["94b707aa.32cb28"]]},{"id":"beceed99.eb71","type":"ui_table","z":"62cdb70e.b8cc78","group":"8f877964.f449b8","name":"table without header","order":2,"width":"6","height":"4","columns":[{"field":"name","title":"xxxxx","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"room","title":"yyyy","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":865,"y":680,"wires":[]},{"id":"94b707aa.32cb28","type":"change","z":"62cdb70e.b8cc78","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"headerVisible\":false}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":680,"wires":[["beceed99.eb71"]]},{"id":"8f877964.f449b8","type":"ui_group","name":"Group 2","tab":"b0e31533.2b0128","order":2,"disp":true,"width":6},{"id":"b0e31533.2b0128","type":"ui_tab","z":"","name":"test","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 July 2020 09:51 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/2 "2020-07-17T09:51:20Z")

</div>

we just pushed a fix that hopefully will also fix this - now available as v0.3.2

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [17 July 2020 10:12 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/3 "2020-07-17T10:12:36Z")

</div>

0.3.2: Thanks! Now, there is no error message and the table is shown.

But still the "ui\_control" with `"headerVisible":false` is ignored. So the table header is visible.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 July 2020 10:26 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/4 "2020-07-17T10:26:12Z")

</div>

hmm

```auto
[{"id":"e640490f.483c18","type":"inject","z":"846d7832.3348c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"name\":\"name1\",\"room\":\"room1\"},{\"name\":\"name2\",\"room\":\"room2\"}]","payloadType":"json","x":130,"y":740,"wires":[["ec0dea01.1e7a28"]]},{"id":"ec0dea01.1e7a28","type":"change","z":"846d7832.3348c8","name":"ui_control","rules":[{"t":"set","p":"ui_control","pt":"msg","to":"{\"tabulator\":{\"headerVisible\":false,\"movableColumns\":false}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":740,"wires":[["ac89146.f80f2e8"]]},{"id":"ac89146.f80f2e8","type":"ui_table","z":"846d7832.3348c8","group":"2e5ea0b8.29145","name":"table without header","order":2,"width":"6","height":"4","columns":[{"field":"name","title":"xxxxx","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"room","title":"yyyy","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":485,"y":740,"wires":[]},{"id":"2e5ea0b8.29145","type":"ui_group","name":"Group 2","tab":"4f89e777.1f6208","order":2,"disp":true,"width":6},{"id":"4f89e777.1f6208","type":"ui_tab","z":"","name":"test","icon":"dashboard","disabled":false,"hidden":false}]

```

gives me  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/a/8a9f809783347a644f42d43f74788e52de862da8.png)

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [17 July 2020 12:40 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/5 "2020-07-17T12:40:51Z")

</div>

S.t.r.a.n.g.e: In dark mode it often works, in light mode not really. But I use light mode ☹

I did some tests:

A) Light theme  
I cleaned up the system (removed all imported nodes, deleted the group, tab and cleared browser cache, restarted browser) then:

1. Imported your flow with header visible false
2. deploy + inject
3. start dashboard  
Result: ui\_control does not work.

![Theme Light](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f58daedd8d7124b703df1df5b4fb0111581be0b3.png)

B. Dark theme  
I switched to dark theme and cleaned the system again. Then same procedure as before

1. Imported your flow
2. deploy + inject
3. start dashboard  
Result: ui\_control works.

![Theme Dark](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/cace3f88fbb65df52a7a5cc0c9484631f2e73ac7.png)

C. Switch from dark to light theme  
I the switched from dark theme (header is hidden) to light theme -\> deploy -\> inject.  
Result is a combination of A) and B)  
 ![Theme Switch](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52cebb32d74b9596aa6d62e259158af3580cd8e8.png)

The header is hidden but it is not light theme.

Any idea how to get it work in light theme with light theme?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 July 2020 13:03 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/6 "2020-07-17T13:03:43Z")

</div>

well - that makes absolutely no sense what so ever.... 🙂  
Happy Friday !

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [17 July 2020 14:31 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/7 "2020-07-17T14:31:34Z")

</div>

Apparently the ui\_table uses different css files for each theme:

`tabulator_midnight.min.css` versus `tabulator.min.css`

Dark:  
 ![dark-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd3572c9d29437f3399d82f31815bedf4b935282.png)

Light:  
 ![light-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/6853b324b0969efa2fd559af889c40d9749f48a7.png)

comparing the minified CSS files I see that the midnight theme has this class:

```auto
.tabulator .tabulator-header.tabulator-header-hidden {

    display: none

  }

```

The light one doesn´t.

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [17 July 2020 14:40 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/8 "2020-07-17T14:40:56Z")

</div>

Great you found the problem! Thank you. There was the same issue before:

> [@Callback as json argument](https://discourse.nodered.org/t/callback-as-json-argument/24529/11):
>
> I took the ui-table example and modified it with "headerVisible": false [image] and I get this: I added your change node with mine (set to true) and I can switch the header on/off with the inject nodes And I updated to the latest version of the dashboard and ui-table (Node-RED 1.0.3) just to be shure. [{"id":"47813b5f.afda84","type":"inject","z":"ab797823.3396a8","name":"","topic":"","payload":"[{\"name\":\"MEQ0451495\",\"room\":\"Bathroom\",\"SET\_TEMPERATURE-value\":22,\"AC…

But I used the dark theme so everything worked as expected.

Where the css expert how can help here? 😉 Or should we upgrade tabulator.js? There are some interesting new features (like persistent layouts) and may different designs.

> <https://github.com/olifolkerd/tabulator/tree/master/dist/css>
>
> //github.com/olifolkerd/tabulator/tree/master/dist/css

or I try a simple copy paste? But these are all for version 4.7 and I thing ui-table uses 4.2

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 July 2020 14:56 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/9 "2020-07-17T14:56:36Z")

</div>

as long as it doesn't break existing then by all means update it.

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [17 July 2020 15:01 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/10 "2020-07-17T15:01:40Z")

</div>

Who knows ... a lot of testing will be required. Perhaps "we" can fix the tabulator.min.css first as a hotfix and then try an upgrade to 4.7

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [17 July 2020 15:12 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/11 "2020-07-17T15:12:31Z")

</div>

well point release "shouldn't break things" but....  
and yes - patching is fine

---

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [17 July 2020 21:17 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/12 "2020-07-17T21:17:41Z")

</div>

should work now ... and by the way I found a small but annoying bug (only appears if you configure the columns by ui\_controll (and not via the UI)

---

<div class="post-metadata">

### Author: ![hklages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hklages/32/23899_2.png) [@hklages](https://discourse.nodered.org/u/hklages)
#### Post date: [19 July 2020 17:57 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/13 "2020-07-19T17:57:41Z")

</div>

yes - it does.

Thanks!

---

<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: [2 August 2020 17:57 UTC](https://discourse.nodered.org/t/ui-table-options-how-example-no-header/30252/14 "2020-08-02T17:57:52Z")

</div>

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