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.

React-json-tree: Add callback when expanding/closing node.

See original GitHub issue

As far as I could see, there is no way of responding to a click on a node in the tree. I need to get the keypath property corresponding the node I clicked on. Currently I’m hijacking valueRender to get this value, but of course this also get called, at least for the root node when re-rendering the component.

Is there any interest in this feature? I badly need this feature and could merge make a PR if there is any interest.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BrunoFenzlcommented, Sep 23, 2020

Thanks for the fast response and clarifying this @Methuselah96 . I have yarn installed but thought it would just execute the commands regardless of how I installed dependencies. I use npm on my projects so I installed everything with npm -i as usual. I just learned something new.

It would be really nice to have this in the readme.

1reaction
Methuselah96commented, Sep 16, 2020

Yeah, that sounds like a valuable feature. Feel free to make a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@minoru/react-dnd-treeview - npm
A callback function to determine if a given node can be dropped to another node. If nothing is returned (or if undefined is...
Read more >
Top 10 Most Common Node.js Developer Mistakes - Toptal
Mistake #4: Expecting Callbacks to Run Synchronously. Asynchronous programming with callbacks may not be something unique to JavaScript and Node.js, but they ...
Read more >
Node.js v19.3.0 Documentation
JSON output#. Added in: v0.6.12. Every .html document has a corresponding .json document. This is ...
Read more >
Strict Mode - React
You can also add a wrapper DOM node in your component and attach a ref directly to it. class MyComponent extends React.Component {...
Read more >
jqTree is a jQuery widget for displaying a tree
JqTree is a jQuery widget for displaying a tree structure in html. It supports json data, loading via ajax and drag-and-drop. NPM version....
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