Skip to content

Expose row index to Node renderer #86

@joshhunt

Description

@joshhunt

I'm trying to give my rows alternate "striped" colors. Using :nth-child(2n + 1) is not great because you get a weird effect as you scroll as items are added and removed from the div.

It would be handy if react-vtree exposed the current row index to the Node renderer. It looks like this is already available internally https://github.com/Lodin/react-vtree/blob/f4d9cd4/src/Tree.tsx#L187

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