johnwalley / allotment

A React component for resizable split views
https://allotment.mulberryhousesoftware.com/
MIT License
949 stars 52 forks source link

Prevent resizing without explicitly setting minSize and maxSize #719

Open DoubleDebug opened 10 months ago

DoubleDebug commented 10 months ago

Hello and thanks for implementing this awesome React library!

I see that in your FAQ (linked below), you answered a question regarding the prevention of resizing: https://github.com/johnwalley/allotment#how-do-i-prevent-a-pane-from-being-resized

However, in order to do this, you would need to know exactly how wide/tall your panes are. In my opinion, there should be a boolean prop called resizable that gives more flexibility to the user.

<Allotment resizable={false}>
     <div>block 1</div>
     <div>block 2</div>
</Allotment>

Would you consider implementing this into the library? It would be much appreciated. Thanks in advance!