Skip to content

Pane content does not appear to be rendered (v3) #865

@maurice

Description

@maurice

Describe the bug

Pane children are not rendered with v3

To Reproduce

See codesandbox example: https://codesandbox.io/p/sandbox/sp59gp?file=%2Fsrc%2FApp.tsx%3A1%2C1-19%2C1

If you can't see that the code is just this, basically the "controlled" example code with a few tweaks

import { SplitPane, Pane } from "react-split-pane";
import { useState } from "react";
import "./styles.css";

export default function App() {
  const [sizes, setSizes] = useState([300, 500]);

  return (
    <SplitPane onResize={setSizes} direction="vertical">
      <Pane size={sizes[0]} minSize="200px">
        <div>top</div>
      </Pane>
      <Pane size={sizes[1]}>
        <div>bottom</div>
      </Pane>
    </SplitPane>
  );
}

(Also the codesandbox project you suggest to fork is using the older 0.1.82 version, so should probably be updated.)

Expected behavior

The pane content should be rendered

Screenshots

Image

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