Drawflow icon indicating copy to clipboard operation
Drawflow copied to clipboard

How do I access a node component from outside that component?

Open cacious7 opened this issue 2 years ago • 3 comments

I have a master component where all the nodes are being created. I want to access the Vue instance of an active node, such as on created, removed, or selected where the node id is provided.

In short, how do I match the id with a corresponding Vue component instance so that I can access the component properties?

cacious7 avatar Jun 09 '22 12:06 cacious7

I don't understand you.

Do you want to get the id?

  • https://github.com/jerosoler/Drawflow/issues/271#issuecomment-944042114

View al issues vue:

  • https://github.com/jerosoler/Drawflow/issues?q=label%3AVue

jerosoler avatar Jun 09 '22 13:06 jerosoler

no, not the id of the node. I want to get the actual Vue component instance associated with the node.

cacious7 avatar Jun 09 '22 14:06 cacious7

The component is mountend in drawflow_content_node for vue2 can be accessed by the variable vue.

View example:

  • https://github.com/jerosoler/Drawflow/issues/306#issuecomment-973864382

For vue3 I don't know.

jerosoler avatar Jun 09 '22 15:06 jerosoler