# Tab groups not hidden at first execution of node-red

**URL:** <https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517>\
**Category:** Dashboard\
**Created:** [12 January 2022 10:47 UTC](https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517 "2022-01-12T10:47:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![between](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@between](https://discourse.nodered.org/u/between)\
**Post date:** [12 January 2022 10:47 UTC](https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517/1 "2022-01-12T10:47:56Z")

</div>

I have a project with a single tab with several groups. By using buttons and an 'ui-control' node I can hide some of the groups and show some of them without problem. I also have an 'inject' node, configured to inject once, for initializing vars and to show/hide the groups at loading of node-red. The problem is that at first execution all the groups are shown ignoring the payload sent to the ui-control:  
msg.payload = {  
"group": {  
"hide": [....],  
"show": [....]  
}  
};  
But the rest of the nodes of the flow are executed properly. If I click on the 'inject' node the complete execution is done. It seems that the payload sent ro the 'ui-control' node is ignored at load of node-red.  
Any idea of how to solve this?

node-red version: 2.1.4  
node.js version: 16.13.0  
dashboard version: 3.1.0

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 January 2022 10:52 UTC](https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517/2 "2022-01-12T10:52:17Z")

</div>

Use a `ui control` node instead of an `inject` to initialise. That node fires on connection (note: there are 3 options in the ui control)

---

<div class="post-metadata">

**Author:** ![between](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@between](https://discourse.nodered.org/u/between)\
**Post date:** [12 January 2022 11:17 UTC](https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517/3 "2022-01-12T11:17:30Z")

</div>

Now is working. Thanks a lot.

---

<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:** [26 January 2022 11:18 UTC](https://discourse.nodered.org/t/tab-groups-not-hidden-at-first-execution-of-node-red/56517/4 "2022-01-26T11:18:15Z")

</div>

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