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

isValidConnection prop on SvelteFlow doesn't trigger for attempted target to target or source to source handle connections #4171

Closed
mcmxcdev opened this issue Apr 17, 2024 · 4 comments

Comments

@mcmxcdev
Copy link

Describe the Bug

As can be seen in the video below, the validation between handles using isValidConnection only kicks in for certain attempted connections.

We would also like to validate an attempted source to source or target to target connection and give the user information about why this is not allowed.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  • create a SvelteFlow using isValidConnection prop
  • create two nodes each having a target and source handle
  • try to connect source to source or target to target
  • expect isValidConnection to not get triggered

Expected behavior

I would expect any attempted connections between handles to trigger isValidConnection

Screenshots or Videos

Screencast.from.2024-04-17.09-17-45.webm

Platform

  • OS: Ubuntu 23.10
  • Browser: Brave
  • Version: Version 1.64.122 Chromium: 123.0.6312.122 (Official Build) (64-bit)

Additional context

No response

@moklick
Copy link
Member

moklick commented Apr 17, 2024

Are you using connectionMode={ConnectionMode.Loose} ?

@mcmxcdev
Copy link
Author

Oh wow I didn't know that exists! I will have a look into it and get this issue closed if it works as expected ;)

@moklick
Copy link
Member

moklick commented May 7, 2024

Does it work for your @mcmxcdev ?

@mcmxcdev
Copy link
Author

It ended up not being a high priority for us; an initial check worked fine, but I will test this out properly some other time!

Closing the issue in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants