You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The children prop is typed as NodeComponentProps on TreeProps, however the type is not exported. Only TreeWalker and TreeWalkerValue types get exported from ./Tree as you can see here
In order to properly type my custom tree node component this type should be exposed to the consumer of the library
The text was updated successfully, but these errors were encountered:
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';
type ITreeWalkerData = {
// This is your data model
}
type TreeNodeComponentProps = Omit<ListChildComponentProps<ITreeWalkerData>, 'index'> & NodePublicState<ITreeWalkerData>
The
children
prop is typed asNodeComponentProps
on TreeProps, however the type is not exported. OnlyTreeWalker
andTreeWalkerValue
types get exported from./Tree
as you can see hereIn order to properly type my custom tree node component this type should be exposed to the consumer of the library
The text was updated successfully, but these errors were encountered: