Config node in EditableList items

Hi all,

is there any possibility to use config nodes within the EditableList widget?

Let's say I have a config node named rooms, and in my widget I have a list of elements in an EditableList, where each item should be mapped to a room (to a config node).

Is there any possibility to accomplish that?

Many thanks,

Christian

Hi @christian.r.r, welcome to the forum.

You can put whatever data you want into the EditableList widget, so in principle yes.

Is the idea the user can select from that list instead of using the normal method of selecting a config node within a node's edit dialog with the select box?

If so, you may run into some issues because the editor does quite a lot of work under the covers when it knows about a relationship between a node and a config node. For example, it keeps track of a config node's users so it knows when a config node is unused.

There may also be issues around import/export - if the editor doesn't know about the relationship properly, then when a user exports your node, it won't know to bring the config node with it.

Allowing more custom relationships between nodes is something that's been hovering around for a while. I recently started work on a design in this area - https://github.com/node-red/designs/pull/37.

If you can describe what you're trying to do a bit more, it would be helpful to understand. There may be a simple solution/workaround for it today, and it may feed into the design.

Hi @knolleary!

Thanks for your quick response.

Let me give you a quick intro in what I want to achieve: I am working on a smart home dashboard frontend that is served as static website through a node; the configuration for this app should be done in NodeRed; The dashboard consists of pages (favorites, rooms, categories), where each page consists of UI groups with multiple UI elements (each UI group belongs to a page and each UI element to a group).

I've now put everything into the editor UI of this one node. I have now an editable list for pages, for UI groups and for UI elements. However, the problem is that the UI becomes sluggish on saving, when having many elements in the lists (e.g. 5 rooms, with 5 UI groups each and 1-3 UI elements in each group). Saving itself is fast, so I guess the problem is the DOM (destruction)!?

To recreate a workflow like with the official RedDashboard, however, seems also to be an overkill for my app.

So my (naive) idea was, to split the configuration of the different pages with their groups and elements into different editor windows by using config nodes.

Nevermind, I've now created several different nodes and use a node network for the configuration. Seems to be the far better choice.