Skip to content

using vis-network events #24

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

Open
hansolGib opened this issue Jan 2, 2023 · 0 comments
Open

using vis-network events #24

hansolGib opened this issue Jan 2, 2023 · 0 comments

Comments

@hansolGib
Copy link

Hello, i'm new to vue.js and vis network.
I created nodes and edges, and wanting to get the node or edge info (such as id) when i select it.
so i made like this
<network ref="network" :nodes="nodes" :edges="edges" :options="options" :events="['selectNode', 'selectEdge']" @select-node="onNodeSelected" @select-edge="onEdgeSelected" />
i understand that @select-node brings vis events 'selectNode' but how can i get the values of the selected node or edge?
data () { onNodeSelected : [] }
i added onNodeSelected as empty array but when i print it after selecting it, it's still empty..

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

1 participant