# Dashboard 2, ui-node in subflow, unable to position widget in group

**URL:** https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [27 March 2024 12:24 UTC](https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805 "2024-03-27T12:24:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 March 2024 12:24 UTC](https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805/1 "2024-03-27T12:24:40Z")

</div>

Has anyone else experimented with ui nodes inside a subflow? I have a ui-template in a subflow with the Group configured via an subflow property. It functions correctly except that the position of the widget in the group does not work at all. When the subflow is first added it appears at the top of the group, but if it is moved in the dashboard layout pane it moves to the bottom of the group and nothing I do seems to change that. I have tried restarting node-red, clearing the browser cache etc but the widget remains stubbornly stuck at the bottom.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 March 2024 14:27 UTC](https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805/2 "2024-03-27T14:27:47Z")

</div>

In fact it is not specific to ui-template nodes. Below is a simple example with a text node in a subflow and two other widgets in a group. The subflow text node can be placed at the top or the bottom (it is often necessary to restart node-red to achieve this) but it cannot be placed between the two.

I will raise an issue, but if anyone has a workaround that would be appreciated as this is holding me up.

```auto
[{"id":"2f0e52fdece0de69","type":"subflow","name":"D2 Subflow test","info":"","category":"","in":[{"x":50,"y":30,"wires":[{"id":"8fb70b21253672bc"}]}],"out":[],"env":[{"name":"Group","type":"ui-group","value":"","ui":{"type":"conf-types"}}],"meta":{},"color":"#DDAA99"},{"id":"8fb70b21253672bc","type":"ui-text","z":"2f0e52fdece0de69","group":"${Group}","order":0,"width":0,"height":0,"name":"Text node in subflow","label":"Text node in subflow","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":350,"y":180,"wires":[]},{"id":"682ba2185159afe5","type":"ui-text","z":"997da33a0beedade","group":"a97448ecc2eeef18","order":1,"width":0,"height":0,"name":"A text node","label":"A text node","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":850,"y":3040,"wires":[]},{"id":"cf1699214f3c72cb","type":"subflow:2f0e52fdece0de69","z":"997da33a0beedade","name":"Text node in subflow","env":[{"name":"Group","value":"a97448ecc2eeef18","type":""},{"key":"DB2_SF_ORDER","value":2,"type":"str"}],"x":880,"y":3140,"wires":[]},{"id":"6d8676e34f68a3c1","type":"ui-dropdown","z":"997da33a0beedade","group":"a97448ecc2eeef18","name":"A dropdown node","label":"Select Option:","tooltip":"","order":3,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":"A","type":"str"},{"label":"","value":"B","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":870,"y":3080,"wires":[[]]},{"id":"a97448ecc2eeef18","type":"ui-group","name":"subflow test group","page":"67c5a34c404dda86","width":"6","height":"1","order":-1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"67c5a34c404dda86","type":"ui-page","name":"subflow test page","ui":"ID-BASE-1","path":"/sub","icon":"home","layout":"grid","theme":"a965ccfef139317a","order":-1,"className":"","visible":"true","disabled":"false"},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard"},{"id":"a965ccfef139317a","type":"ui-theme","name":"Default","colors":{"surface":"#404040","primary":"#109fbc","bgPage":"#e8e8e8","groupBg":"#d6d6d6","groupOutline":"#6fbc10"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

```

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [27 March 2024 14:42 UTC](https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805/3 "2024-03-27T14:42:15Z")

</div>

Issue raised.

> <https://github.com/FlowFuse/node-red-dashboard/issues/710>
>
> \### Current Behavior
> 
> I have a ui-text in a subflow with the Group configured vi…a a subflow property. It functions correctly except that the position of the widget in the group does not work if the group has at least two other (non-subflow) widgets. It is possible to position it at the top or the bottom, though often node-red must be restarted for that work, but it seems not possible to position it between the other two nodes. I have tried restarting node-red, clearing the browser cache etc but the widget remains stubbornly stuck at the bottom or top. If there is a workaround I would grateful to know it as this is holding me up.
> 
> \### Expected Behavior
> 
> It should be possible to position it.
> 
> \### Steps To Reproduce
> 
> Import this example flow and attempt to position the subflow node between the other two.
> 
> \`\`\`
> \[{"id":"2f0e52fdece0de69","type":"subflow","name":"D2 Subflow test","info":"","category":"","in":\[{"x":50,"y":30,"wires":\[{"id":"8fb70b21253672bc"}\]}\],"out":\[\],"env":\[{"name":"Group","type":"ui-group","value":"","ui":{"type":"conf-types"}}\],"meta":{},"color":"#DDAA99"},{"id":"8fb70b21253672bc","type":"ui-text","z":"2f0e52fdece0de69","group":"${Group}","order":0,"width":0,"height":0,"name":"Text node in subflow","label":"Text node in subflow","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":350,"y":180,"wires":\[\]},{"id":"682ba2185159afe5","type":"ui-text","z":"997da33a0beedade","group":"a97448ecc2eeef18","order":1,"width":0,"height":0,"name":"A text node","label":"A text node","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":850,"y":3040,"wires":\[\]},{"id":"cf1699214f3c72cb","type":"subflow:2f0e52fdece0de69","z":"997da33a0beedade","name":"Text node in subflow","env":\[{"name":"Group","value":"a97448ecc2eeef18","type":""},{"key":"DB2\_SF\_ORDER","value":2,"type":"str"}\],"x":880,"y":3140,"wires":\[\]},{"id":"6d8676e34f68a3c1","type":"ui-dropdown","z":"997da33a0beedade","group":"a97448ecc2eeef18","name":"A dropdown node","label":"Select Option:","tooltip":"","order":3,"width":0,"height":0,"passthru":false,"multiple":false,"options":\[{"label":"","value":"A","type":"str"},{"label":"","value":"B","type":"str"}\],"payload":"","topic":"topic","topicType":"msg","className":"","x":870,"y":3080,"wires":\[\[\]\]},{"id":"a97448ecc2eeef18","type":"ui-group","name":"subflow test group","page":"67c5a34c404dda86","width":"6","height":"1","order":-1,"showTitle":true,"className":"","visible":"true","disabled":"false"},{"id":"67c5a34c404dda86","type":"ui-page","name":"subflow test page","ui":"ID-BASE-1","path":"/sub","icon":"home","layout":"grid","theme":"a965ccfef139317a","order":-1,"className":"","visible":"true","disabled":"false"},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard"},{"id":"a965ccfef139317a","type":"ui-theme","name":"Default","colors":{"surface":"#404040","primary":"#109fbc","bgPage":"#e8e8e8","groupBg":"#d6d6d6","groupOutline":"#6fbc10"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}\]
> \`\`\`
> 
> \### Environment
> 
> \- Dashboard version: 1.5.1
> \- Node-RED version: 4.0.0 Beta 1
> \- Node.js version: 20.5.1
> \- npm version:
> \- Platform/OS: Ubuntu on laptop
> \- Browser: Edge
> 
> 
> \### Have you provided an initial effort estimate for this issue?
> 
> I am not a FlowFuse team member

---

<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 April 2024 14:42 UTC](https://discourse.nodered.org/t/dashboard-2-ui-node-in-subflow-unable-to-position-widget-in-group/86805/4 "2024-04-26T14:42:48Z")

</div>

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