react-inspector
react-inspector copied to clipboard
expandLevel infinity
Hi,
I would like to propose API change so that the expandLevel also takes Infinity. Currently, it is not possible to set the tree view to the fully expanded state by any other way than by setting expandLevel to some arbitrarily large number.
I also tried Number.MAX_SAFE_INTEGER but that (along with Infinity) causes to throw `Invalid array length'.
I cannot verify right now because I am at a different computer, but I had some object with like 10 levels, and expanding to all levels with expandLevel=100 was noticeably slower than expandLevel=15. I Will try to investigate more tomorrow.
@Hurtak sounds reasonable enough to me, would you be able to open a PR?