Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for Multiple Handles on Nodes #1412

Closed
1 task done
frj9641 opened this issue May 17, 2024 · 5 comments
Closed
1 task done

Feature Request: Support for Multiple Handles on Nodes #1412

frj9641 opened this issue May 17, 2024 · 5 comments
Assignees
Labels
bug Something isn't working triage Awaiting triage

Comments

@frj9641
Copy link

frj9641 commented May 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues and this is a new bug.

Current Behavior

nodes are limited to having a single input and a single output

Expected Behavior

Description:

Hello,

I have a feature request regarding the functionality of nodes in Vueflow. Currently, nodes are limited to having a single input and a single output. However, I would like to have nodes with multiple input and output handles. Additionally, I need the flexibility for a single handle to act as both an input and an output.

My specific requirements are:

1.Nodes should support multiple input handles.
2.Nodes should support multiple output handles.
3.A single handle on a node should be able to function as both an input and an output.
Is there any existing implementation that supports these features, or is there a plan to include this functionality in future updates?

Thank you for your attention to this request.

Best regards,

Steps To Reproduce

No response

Relevant log output

No response

Anything else?

No response

@frj9641 frj9641 added bug Something isn't working triage Awaiting triage labels May 17, 2024
@bcakmakoglu
Copy link
Owner

bcakmakoglu commented May 17, 2024

Nodes are not limited to having one handle of each type. Custom nodes can have whatever number of handles you want them to have. See this example.
Just use the <Handle> component and make sure that each Handle gets a unique id and you're good.

@frj9641
Copy link
Author

frj9641 commented May 17, 2024

Nodes are not limited to having one handle of each type. Custom nodes can have whatever number of handles you want them to have. See this example. Just use the <Handle> component and make sure that each Handle gets a unique id and you're good.

I have implemented the code according to the example you provided. However, I found that even if I define multiple source handles, the connection still only starts from the first defined source handle. How should I solve this issue?

@bcakmakoglu
Copy link
Owner

make sure that each Handle gets a unique id and you're good.

@frj9641
Copy link
Author

frj9641 commented May 20, 2024

make sure that each Handle gets a unique id and you're good.

image
动画1

I have implemented the code according to the example you provided. However, I found that even if I define multiple source handles, the connection still only starts from the first defined source handle. How should I solve this issue?

@frj9641
Copy link
Author

frj9641 commented May 20, 2024

make sure that each Handle gets a unique id and you're good.

I forget the sourceHandle and targetHandle of edge. have solved problem. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants