react-vtree icon indicating copy to clipboard operation
react-vtree copied to clipboard

Exposes NodeComponentProps

Open jdmg94 opened this issue 4 years ago • 1 comments

This type needs to be exposed in order to properly type custom node components, see issue #81

jdmg94 avatar Oct 08 '21 00:10 jdmg94

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 = {
 // This is your data model
}

type TreeNodeComponentProps = ListChildComponentProps<ITreeWalkerData> & NodePublicState<ITreeWalkerData>;

gregjoeval avatar Aug 31 '22 16:08 gregjoeval