bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.87k stars 135 forks source link

How to change minimum size to collapse the panel #283

Closed arpitBhalla closed 8 months ago

arpitBhalla commented 8 months ago

Right now, when I drag the handle to ~50% it collapses, is there any way to increase this?

bvaughn commented 8 months ago

This is very little context. You'll need to provide a runnable example that I can look at (your code and its behavior) before I can help.

bvaughn commented 8 months ago

I'll take a stab at this question:

How to change minimum size to collapse the panel

You specify the panel's minimum, non-collapsed size (minSize) and it collapses whenever you resize it to less than 50% of that minimum size, as you see here:

https://github.com/bvaughn/react-resizable-panels/assets/29597/54b640f9-325a-4f56-817e-95af8aa7c7a2

I'm going to close this as answered. If you have a follow up question though, feel free.

arpitBhalla commented 8 months ago

Yes, is there any way to change 50% to any other fraction?

Like 90% of minSize?

bvaughn commented 8 months ago

No. That's not supported.