[Sandbox] Fail to remove links / nodes in the live demo example
See original GitHub issueDescribe the bug
The sandbox example breaks when the user tries to remove an item by using the -
links found in the editable Graph Data section. This applies to both nodes or links.
To Reproduce Steps to reproduce the behavior:
- Go to the sandbox page
- Expand the
links
ornodes
property in the Graph Data section of the page - Click the
-
button next to the link / node that you wish to remove - See error
Expected behavior The selected node or link should dissappear from the editable data view and the graph shall be updated accordingly.
Additional context When trying to remove a link, the following error is displayed at the developer’s console:
react-dom.production.min.js?f6dd:188 TypeError: Cannot read property 'source' of null
at eval (graph.helper.js?28ec:219)
at Array.find (<anonymous>)
at _loop (graph.helper.js?28ec:219)
at _validateGraphData (graph.helper.js?28ec:216)
at Object.initializeGraphState (graph.helper.js?28ec:324)
at Graph.componentWillReceiveProps (Graph.jsx?fe1a:436)
at sg (react-dom.production.min.js?f6dd:150)
at Sg (react-dom.production.min.js?f6dd:178)
at yh (react-dom.production.min.js?f6dd:202)
at zh (react-dom.production.min.js?f6dd:203)
If the item you’re trying to delete is a node, then the following error is shown instead:
react-dom.production.min.js?f6dd:188 TypeError: Cannot read property 'x' of null
at eval (Sandbox.jsx?dd0e:238)
at Array.map (<anonymous>)
at Sandbox.decorateGraphNodesWithInitialPositioning (Sandbox.jsx?dd0e:236)
at Sandbox.render (Sandbox.jsx?dd0e:314)
at Lg (react-dom.production.min.js?f6dd:167)
at Sg (react-dom.production.min.js?f6dd:180)
at yh (react-dom.production.min.js?f6dd:202)
at zh (react-dom.production.min.js?f6dd:203)
at Wh (react-dom.production.min.js?f6dd:212)
at Zh (react-dom.production.min.js?f6dd:211)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
VS Code Sandboxing
Migrating Visual Studio Code to Electron process sandboxing. ... Removing Node.js by providing an asynchronous alternative in Electron.
Read more >Managing Production and Sandbox Environments - Business ...
When the sandbox is upgraded, these apps are removed because the environment is moved to another node that is running the new version....
Read more >FAQs - CodeSandbox
How do I make a sandbox private? I'm getting a 422 error when importing from GitHub, why? Why are my start scripts not...
Read more >TS Playground - An online editor for exploring TypeScript and ...
A place to experiment with TypeScript syntax, and share the URLs with others. // - A sandbox to experiment with different compiler features...
Read more >Get started with the Twilio Sandbox for WhatsApp
With the Twilio Sandbox for WhatsApp, you can start prototyping with Twilio API functionality and sending WhatsApp messages right away: outbound and inbound ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed with #216
Thanks 😃 Maybe the
onDeltaUpdate
(https://github.com/oxyno-zeta/react-editable-json-tree#ondeltaupdate) is better because there is a delta object that can help you to detectnull
objects and where are they no ?