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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [BUG]: some event Types are missing (nodeClick, nodeDoubleClick, ...) #1342

Open
1 task done
Tracked by #1343
delphi-sucks opened this issue Mar 6, 2024 · 6 comments 路 Fixed by #1344 or #1348
Open
1 task done
Tracked by #1343

馃悰 [BUG]: some event Types are missing (nodeClick, nodeDoubleClick, ...) #1342

delphi-sucks opened this issue Mar 6, 2024 · 6 comments 路 Fixed by #1344 or #1348
Assignees
Labels
bug Something isn't working

Comments

@delphi-sucks
Copy link

Is there an existing issue for this?

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

Current Behavior

The published build seems to be missing some event type definitions for Typescript.

The events for @node-click, @node-double-click, @node-context-menu, @nodes-change, ... still work like expected, but the types are missing in VueFlow.vue.d.ts.

The edge-Emits on the other hand work like expected.

Expected Behavior

The emit types for the mentioned emits should appear within the released build.

Steps To Reproduce

  1. Create a new Vue-Project with @vue-flow/core
  2. Implement vue-flow like in the described in the Quickstart
  3. Implement @node-click
    => Typescript doesn't know the event

Relevant log output

No response

Anything else?

With v1.23.0 it still worked and since v1.24.0 the problem exists.

The FlowEmits type within vue-flow's source seems to be correct, but for some reason some events get missing within the type-defintion file VueFlow.vue.d.ts.

@delphi-sucks delphi-sucks added bug Something isn't working triage Awaiting triage labels Mar 6, 2024
@bcakmakoglu bcakmakoglu removed the triage Awaiting triage label Mar 6, 2024
@bcakmakoglu
Copy link
Owner

Thanks for the report.
Seems like this was introduced with an internal update to Vue 3.3 and vue-tsc 1.8.x, which for some reason produce incorrect definition files.
The edge events seem to overwrite the node events, for whatever reason that is beyond me.

Though there is a solution for this and it will be released with the next patch (1.33.3).

@bcakmakoglu
Copy link
Owner

Fixed with 1.33.3

@bcakmakoglu
Copy link
Owner

Mh... seems like this introduced different warnings now 馃ぃ
I'll reopen this issue to keep track

@bcakmakoglu bcakmakoglu reopened this Mar 6, 2024
@bcakmakoglu
Copy link
Owner

Changing the order of the events in the interface actually solved the issue...
Very strange, I'll note that down and keep an eye on it but the issue should be resolved with 1.33.4.

@bcakmakoglu bcakmakoglu linked a pull request Mar 6, 2024 that will close this issue
@delphi-sucks
Copy link
Author

@bcakmakoglu I just updated to the latest release (1.33.4) and the events nodeClick and most others, seem to work now, but there are still other events missing.

In my case:

  • onConnect
  • onNodesChange

Seems like Vue is behaving here quite weird in generating the type definition? O.o

@bcakmakoglu
Copy link
Owner

Ugh... really?
Yeah it seems to behave like an idiot for some reason and it's super bothersome to check if every event is correctly defined one by one since there's a lot of them 鈽癸笍

I'll see if there's more moving around I can do that'll fix it or ask someone in the Vue Discord what the hell is up with this issue.

Will re-open this issue again until this is properly sorted out 馃ゲ

@bcakmakoglu bcakmakoglu reopened this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants