Skip to content

InfiniteTree nodes/height not calculated correctly with flexbox #8

Open
@frankvdb7

Description

@frankvdb7

When I try to use flexbox with the InfiniteTree component like this:

render() {
    return (
        <div style={{ display: "flex", flexDirection:"column" }}>
          <InfiniteTree
              width="100%"
              height="100%"
              style={{ flex: "1 1 auto" }}
              rowHeight={30}
              data={someData}
           />
        </div>
    )
}

The div and InfiniteTree container correctly expand to height 100% in the inspector, but the InfiniteTree component only shows 5 nodes instead of filling in rows until the 100% height. So lets say we have room for 10 nodes of 30 pixels (100% height = 300px), it only show 4 nodes of 30 pixels (120px), so there is 180px of empty space.

Is there a way to solve this?

Thanks

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