Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a 3rd pane? #81

Open
davidworkman9 opened this issue Apr 21, 2016 · 9 comments
Open

Support a 3rd pane? #81

davidworkman9 opened this issue Apr 21, 2016 · 9 comments

Comments

@davidworkman9
Copy link

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

@tomkp
Copy link
Owner

tomkp commented Apr 21, 2016

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...

@davidworkman9
Copy link
Author

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

@eduedix
Copy link

eduedix commented May 23, 2016

I would also be interested in that.

@ekmartin ekmartin mentioned this issue Sep 6, 2016
6 tasks
@greggman
Copy link

greggman commented Dec 13, 2016

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 😅

@wangxuepeng
Copy link

Support, this is awesome if it's possible.

@grovesNL
Copy link

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

@leefsmp
Copy link

leefsmp commented Jan 22, 2017

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!

@vinuthakaranth
Copy link

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

@Pet3ris
Copy link

Pet3ris commented May 14, 2021

Also have this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants