Greg Valentine
Greg Valentine
Thanks for the reply! If you were able to support [ESM](https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm) then that would most likely suffice. I personally use [tsdx](https://github.com/formium/tsdx) for my typescript packages and I'm sure you would...
also as a work-around, I believe this is the equivalent type for anyone wondering ``` import { ListChildComponentProps } from 'react-window'; import { NodePublicState } from 'react-vtree/dist/es/Tree'; type ITreeWalkerData =...
Each node has its own state. In order to collapse everything under a node you need to use `recomputeTree` which is accessible when using a `ref`.
if you know the node id, this should work ``` useEffect( () => { if (scrollToNodeId !== null) { ref.current?.scrollToItem(scrollToNodeId); } }, // Note: only want this to run once...
this is what I've done, hope this helps ``` const ref = useRef(null); const collapseAllNodes = useCallback(async () => { await ref.current?.recomputeTree( Object.fromEntries( // Note: This is for a tree...
Could you link an example where you've seen sorting of a tree structure? For filtering I think you're "gonna have a bad time" if you're trying to show/hide nodes that...
this would also be helpful for debugging purposes
The ReadMe states that the `requestIdleCallback` api will only be used for browser that support it, but that seems to not be the case. I provided a work around for...
for anyone wondering or in need of a work around, I believe this is the equivalent type ``` import { NodePublicState } from 'react-vtree/dist/es/Tree'; import { ListChildComponentProps } from 'react-window';...
I can provide a more in depth example in one of my own repos if necessary