You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add a config node to node generated by the templates, but I stuck with the defaults in the index.ts
I got a config-node 'my-config' with two parameters, 'name' and 'vendor', and a regular node my-node.
I added the two parameters to 'my-config/shared/types.ts' like this: export interface MyConfigOptions { name: string vendor : string }
In the 'my-node/shared/types.ts' I added the 'MyConfigOptions' like this:
So far so good (and hopefully right). Now I want to make it editable in the my-node.html section. Therefore I tried to add to the 'index.ts', in the defaults section an entry with the according type:
But value: "" is not correct of course, as is does not contain the name and vendor. I tried to add an according document ( {'name': '', 'vendor': ''} ) and also a new MyNodeOptions (), but both don't work as it request an extension to a node...
Could you please help me out and add an example how to use a config node in combination with a node...
Regards and thanks,
Thomas
The text was updated successfully, but these errors were encountered:
@Weinschenk hi, I recently used this great template project to build a node-red integration for another one of my projects. I also used config nodes for my integration:
The issue I had with the templated config nodes generated by this project is that there is a typo in the template which results in config node details instantly disappearing.
I tried to add a config node to node generated by the templates, but I stuck with the defaults in the index.ts
I got a config-node 'my-config' with two parameters, 'name' and 'vendor', and a regular node my-node.
I added the two parameters to 'my-config/shared/types.ts' like this:
export interface MyConfigOptions { name: string vendor : string }
In the 'my-node/shared/types.ts' I added the 'MyConfigOptions' like this:
... export interface MyNodeOptions { operation: TransformTextOperation, connection: MyConfigOptions; }
So far so good (and hopefully right). Now I want to make it editable in the my-node.html section. Therefore I tried to add to the 'index.ts', in the defaults section an entry with the according type:
... defaults: { operation: { value: TransformTextOperation.UpperCase }, connection: { value: "", type:"my-config"}, name: { value: "" }, }, ...
But
value: ""
is not correct of course, as is does not contain the name and vendor. I tried to add an according document( {'name': '', 'vendor': ''} )
and also anew MyNodeOptions ()
, but both don't work as it request an extension to a node...Could you please help me out and add an example how to use a config node in combination with a node...
Regards and thanks,
Thomas
The text was updated successfully, but these errors were encountered: