Open
Description
Hello. I found this library for json data display, but i do not see a way how to calculate the initial expansion and collapse state of each individual node. Ideally, there could be a function that can be implemented and passed to the JsonView component called:
shouldExpandNodeInitially={(
keyPath: (string | number)[], // denotes the keypath of the current node in the json structure
): boolean => {}
if the result is true - node should be expanded
if the result is false - node should be collapsed
This way the initial expansion could be calculated for each node separately and it would be possible to decide for each node if it should be opened or not. The current attribute 'collapsed' lets me control the collapsion state of the whole tree, which does not seem to allow to configure each node separately and limits my needs.
Any idea on how this issue could be solved?
Metadata
Metadata
Assignees
Labels
No labels