Thank you for this project! Here is a feature request:
Allow collapsed to recieve a function that determines if a node should be open or not, given its depth and content.
Use case: Sometimes it is useful to hide not only nodes below a certain depth, but also those with very many children.
It would be nice to be able to do something like this: collapsed: (key, depth, content) => depth > 2 || content.length > 200
This would allow all sorts of custom behaviour:
collapsed: (key, depth, content) => key.startsWith("_")
For an example of this, see https://github.com/microlinkhq/react-json-view where shouldCollapse offers this functionality
Thank you for this project! Here is a feature request:
Allow
collapsedto recieve a function that determines if a node should be open or not, given its depth and content.Use case: Sometimes it is useful to hide not only nodes below a certain depth, but also those with very many children.
It would be nice to be able to do something like this:
collapsed: (key, depth, content) => depth > 2 || content.length > 200This would allow all sorts of custom behaviour:
collapsed: (key, depth, content) => key.startsWith("_")For an example of this, see https://github.com/microlinkhq/react-json-view where
shouldCollapseoffers this functionality