react-vis-network icon indicating copy to clipboard operation
react-vis-network copied to clipboard

selectNodes in component

Open gustavopiucco opened this issue 6 years ago • 0 comments

Hello,

To select a Node, I need to use React.createRef to access vis network instance and then this.networkRef.current.network.selectNodes([])

It would be amazing if you implement a prop such as:

<Node selectedNode={true} id="vader" label="Darth Vader" />
<Node selectedNode={true} id="luke" label="Luke Skywalker" />
<Node selectedNode={false} id="leia" label="Leia Organa" />

Or

<Network selectedNodes={[]} />

Or something like that.

Thanks

gustavopiucco avatar Feb 27 '19 10:02 gustavopiucco