react-split-pane icon indicating copy to clipboard operation
react-split-pane copied to clipboard

Support a 3rd pane?

Open davidworkman9 opened this issue 8 years ago • 9 comments

I don't know how hard it would be but it would be nice if there could be more than 2 panes.

davidworkman9 avatar Apr 21 '16 19:04 davidworkman9

Your best bet is to nest the panes.. I've updated the examples to include one for 3 vertical panes.... (https://github.com/tomkp/react-split-pane/blob/master/demo/Examples.js)

Here's it in action: (http://react-split-pane.surge.sh/multiple-panes-vertical.html)

This is the corresponding code...

<SplitPane split="vertical" defaultSize="33%">
            <div></div>
            <SplitPane split="vertical" defaultSize="50%">
                <div></div>
                <div></div>
            </SplitPane>
        </SplitPane>

Hope this helps...

tomkp avatar Apr 21 '16 20:04 tomkp

Thanks! I tried that, and ended up with a ton of scroll bars. I must have some CSS stuff to sort out. Is there a way to make the 2nd pane shrink when the first is resized, but leave the 3rd alone?

What I want is pretty much this (excluding the top and bottom pieces): http://layout.jquery-dev.com/demos/simple.html

davidworkman9 avatar Apr 21 '16 20:04 davidworkman9

I would also be interested in that.

eduedix avatar May 23 '16 13:05 eduedix

The problem with nesting panes is resizing doesn't work intuitively at all. Let's say I have 3 panes

  +-----+-----+-----+
  |  A  |  B  |  C  |
  +-----+-----+-----+

And lets say it's split so the outer split is A vs BC and on the right is a nested split for B vs C

So if I drag the sizer between A and B the sizer for C moves. But that's not what pretty much any user wants to happen.

react-split-3-pane-nested

If they move the sizer between A and B it should only make A and B bigger or smaller and not affect C.

vscode-3-panes

The more nested the worse this gets making it very hard to adjust pane sizes.

So, it would be awesome if there was a splitpane with N panes that solved this issue.

PS: I'm not whining just pointing out an possible issue 😅

greggman avatar Dec 13 '16 13:12 greggman

Support, this is awesome if it's possible.

wangxuepeng avatar Dec 13 '16 13:12 wangxuepeng

Came here to mention the same issue as @greggman. It would be great if it's easily solvable.

grovesNL avatar Jan 11 '17 20:01 grovesNL

I needed that feature badly, so after hours of research browsing the web, I wrote my own resizable layout component library: react-reflex. That was not easily solvable, as far as I can tell. I appreciate feedback from the community. Thanks!

leefsmp avatar Jan 22 '17 14:01 leefsmp

Any updates on this issue/feature? It would be an awesome feature!

vinuthakaranth avatar Aug 20 '19 23:08 vinuthakaranth

Also have this issue!

Pet3ris avatar May 14 '21 10:05 Pet3ris