Skip to content

Mismatches between ES code and TS typings #77

@NicoleRauch

Description

@NicoleRauch

Hi all,

I've just started exploring whether react-virtualized-tree might be a viable solution for my project, and so far it looks really good! Thanks for providing it :-)

But I'm working with TypeScript and so I bumped into some mismatches between the actual code and the typings. I hope you can get me sorted here.

  1. ExpandableRenderProps is the type of the props that the Expandable renderer receives. The Expandable component clearly makes use of the children prop (see lines 16 and 38) but the type does not contain children. Is this an error in the typings? Or am I misunderstanding something here?

  2. The onChange() handler of the Expandable renderer is supposed to receive a NodeAction as per the TS types, but it is always invoked with the full tree. I'd be very interested in getting a NodeAction for reasons of post-processing (so I am not forced to reverse-engineer the new tree to figure out what changed), but from looking at the code of Expandable.js it is not clear to me where I can get that from. Can you please point me in the right direction here?

Thank you,
Nicole

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions