Is there a way to expand to a certain state?
Hi! What I'm trying to do is keep the json expanded state so that when I close the component and re-open it the expansion isn't lost. I don't see any obvious way to pass an expansion map. Any thoughts on how to do this? Thank you!!
https://github.com/uiwjs/react-json-view/blob/b1c5b0d53dfd1bc1107e5ec67387fcf9ad23b586/core/README.md?plain=1#L736-L741
https://github.com/uiwjs/react-json-view/blob/b1c5b0d53dfd1bc1107e5ec67387fcf9ad23b586/core/README.md?plain=1#L733-L736
https://github.com/uiwjs/react-json-view/blob/b1c5b0d53dfd1bc1107e5ec67387fcf9ad23b586/core/src/index.tsx#L60-L64
@olly-writes-code
I think that is half of what is needed, a way of setting what is expanded. The other half would be a way of knowing what is already expanded, so you can save it (or in my case make a small alteration).
From https://github.com/uiwjs/react-json-view/issues/59, I think that the onExpand event could be used to update an object with what is currently expanded/collapsed, so it can be used later.