Replies: 1 comment
-
This can be done either by using a dynamic node (example) or a custom node (example) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Port btn on the node
How do I add the functionality such that when user clicks on "Ports" btn,
Dynamically a new TextInputInterface should be added below the node as P1, P2, P3 ...as per no. of clicks
#MyNode.ts / jsx
import { defineNode, NodeInterface } from "@baklavajs/core";
import { NumberInterface, SelectInterface,ButtonInterface } from "@baklavajs/renderer-vue";
export default defineNode({
type: "MyNode",
inputs: {
number1: () => new NumberInterface("Number", 1),
number2: () => new NumberInterface("Number", 10),
operation: () =>
new SelectInterface("Operation", "Add", ["Add", "Subtract"]).setPort(
false
),
port_button: () => new ButtonInterface("Port", () => console.log("Button clicked")),
},
outputs: {
output: () => new NodeInterface("Output", 0)
}
});
Beta Was this translation helpful? Give feedback.
All reactions