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

minSize only enforced on Pane1

Open chalda opened this issue 9 years ago • 3 comments
trafficstars

I can see that min-width only gets set on Pane1 (or may be just the default) but it doesn't enforce the width restriction on the 2nd Pane.

chalda avatar Jul 07 '16 21:07 chalda

I would like a way to make sure that the split line cannot be dragged outside the current visible container.

For example: Make the whole browser window smaller, drag the split line outside the browser and drop it. Maximize the browser, and the split line will appear where you dropped it. I want to limit the user to drop the split line only inside the currently visible container.

I have nested panels, and the panel on the right is being pushed completely out of view when I make the panel on the left bigger. I have other controls to hide and show the different panels. I would like to make it so that sliding the splits does not completely hide any panel.

If I could set a minSize on the second panel, that could be one way of keeping the split line inside the currently visible container.

dancron avatar Aug 31 '16 20:08 dancron

@dancron, @chalda, have you tried setting a maxSize to a negative value? For example, if you set a maxSize of -10, then the secondary pane will never be smaller than 10px.

IanVS avatar Oct 10 '16 01:10 IanVS

@IanVS Can't thank you enough. I never thought of this so I had to switch to v2, but v2 is pretty buggy at the moment and the development seems to have stopped :(

akphi avatar Aug 11 '19 23:08 akphi