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

SvelteFlow on:selectionchange doesn't get called #3984

Closed
Sahasrara opened this issue Mar 6, 2024 · 3 comments
Closed

SvelteFlow on:selectionchange doesn't get called #3984

Sahasrara opened this issue Mar 6, 2024 · 3 comments
Assignees
Labels
svelte svelte flow related

Comments

@Sahasrara
Copy link

Describe the Bug

I just noticed that on:selectionchange is never called in SvelteFlow.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Try assigning a handler to on:selectionchange

<SvelteFlow
    on:selectionchange={onSelectionChanged}
/>

The onSelectionChanged function is never called.

Expected behavior

I would expect onSelectionChanged to be called when:

  1. A node or edge is clicked that wasn't already selected
  2. A selection rectangle is drawn

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Electron
  • Version: ^28.1.1

Additional context

No response

@moklick
Copy link
Member

moklick commented Mar 7, 2024

That handler doesn't exist. Where did you find it?

@moklick moklick self-assigned this Mar 7, 2024
@moklick moklick added the svelte svelte flow related label Mar 7, 2024
@Sahasrara
Copy link
Author

Oh! I figured it existed based on my conversation with Peter here:
https://discord.com/channels/771389069270712320/1118204997671334019/1209083389286547467

But if that event doesn't exist, then I assume we're supposed to rely on on:nodedragstop, but I don't see that being called when you're dragging a selection.

@peterkogo
Copy link
Member

@Sahasrara You can track the progress on this here. If this pull request lands, you will receive nodedragstop events, when you drag the selection box, too.

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

No branches or pull requests

3 participants