json-formatter icon indicating copy to clipboard operation
json-formatter copied to clipboard

Ability to collapse/expand all

Open ZephD opened this issue 6 years ago • 1 comments

It would be very useful if you could "collapse all" and then open the path(s) you need.

This is especially useful when using the browser search, as only expanded sections get searched!

ZephD avatar Jul 18 '18 09:07 ZephD

One common implementation of this is to alt+click on an arrow in the tree. If the corresponding node is expanded, it will collapse that node and all of its descendants. If the node is collapsed, it will expand that node and all of its descendants.

As for the searching issue, I think the best solution would be a search box at the top with a few checkboxes next to it to toggle regex mode and case sensitive mode. This would automatically highlight any search results in the tree as you type while expanding nodes that are ancestors of a match and collapsing nodes that aren't.

nerivera avatar May 12 '21 20:05 nerivera