Skip to content

Example how to use config node missing #4

Closed
@Weinschenk

Description

@Weinschenk

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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions