question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Sandbox] Fail to remove links / nodes in the live demo example

See original GitHub issue

Describe 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:

  1. Go to the sandbox page
  2. Expand the links or nodes property in the Graph Data section of the page
  3. Click the - button next to the link / node that you wish to remove
  4. 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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
danielcaldascommented, Aug 8, 2019

Fixed with #216

1reaction
oxyno-zetacommented, Aug 8, 2019

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 detect null objects and where are they no ?

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found