Skip to content

using vis-network events #24

@hansolGib

Description

@hansolGib

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions