YYsuni / react18-json-view

JSON viewer for react18
https://jv.yysuni.com/
MIT License
236 stars 15 forks source link

How to create a table of contents or similar menu? #4

Closed Rietty closed 8 months ago

Rietty commented 10 months ago

Bit of an odd use-case but some of the forms I am making can get pretty big, it would be neat if we could have some sort of table of contents mechanism that could be enabled and would result in one being made and put at the start/top of the form. Can be hidden behind a prop in the settings. So clicking on a link in the table of contents will automatically jump you to the correct part of the form.

Would appreciate if possible. I'm very much a beginner at React in general so not sure where to start. If you have pointers I'll gladly take them. If it's out of scope, that's okay too.

Thank you so much for this.

YYsuni commented 10 months ago

It appears that you are looking for a file directory component.🧐

Rietty commented 10 months ago

It appears that you are looking for a file directory component.🧐

Googling that doesn't really seem to come up with anything specific. Do you have an example somewhere if possible?

YYsuni commented 10 months ago

https://github.com/search?q=react+tree&type=repositories , Try this.