jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.65k stars 722 forks source link

Emitting from child to parent [Vue 3] #102

Closed mucskaati closed 3 years ago

mucskaati commented 3 years ago

Hello,

how can I emit event from child component ( which is a registered node) to parent component where I am initializing drawflow and adding nodes?

Thanks.

ananddoesembed commented 3 years ago

you can use event bus for it. check comment #37

mucskaati commented 3 years ago

@ananddoesembed Yes, but in Vue 3 is event bus deprecated, but I found a solution.

In Vue 3 is need to be used a third party package for creating event bus. For example Mitt

jerosoler commented 2 years ago

With the new version 0.0.50 this can be solved in another way. View https://github.com/jerosoler/Drawflow/issues/274#issuecomment-946454633