redux-devtools icon indicating copy to clipboard operation
redux-devtools copied to clipboard

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

Open BrunoFenzl opened this issue 3 years ago • 6 comments

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.

BrunoFenzl avatar Sep 16 '20 07:09 BrunoFenzl

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

Methuselah96 avatar Sep 16 '20 13:09 Methuselah96

Nice, will do.

BrunoFenzl avatar Sep 16 '20 14:09 BrunoFenzl

Hi @Methuselah96 .

I'm having a hard time trying to get my environment right. It seems I have all sorts of version mismatches and missing deps. Is there a guide on how to contribute and system requirements anywhere? I tried on two machines with node 12.5 and 14.12. Thanks in advance!

BrunoFenzl avatar Sep 23 '20 19:09 BrunoFenzl

Are you using Yarn? The monorepo uses Yarn workspaces, so it won't work with npm.

Methuselah96 avatar Sep 23 '20 19:09 Methuselah96

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.

BrunoFenzl avatar Sep 23 '20 20:09 BrunoFenzl

@BrunoFenzl Glad it worked out. Sorry about the lack of developer documentation, still just trying to clean things up. Feel free to ask if you have any other questions.

Methuselah96 avatar Sep 23 '20 20:09 Methuselah96