bvaughn / react-resizable-panels

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

Add option to reset React-Resizable-Pane to default size on external button click #344

Closed SagarDhyani closed 2 months ago

SagarDhyani commented 2 months ago

Is there any existing functionality or workaround in React-Resizable-Pane that allows resetting the pane to its default size upon clicking a button outside the component? If not, could this feature be considered for implementation?

We believe this feature would greatly enhance user experience by providing a convenient way to reset the resizable pane without directly interacting with it.

bvaughn commented 2 months ago

Application code assigns the default size and application code can use the imperative setLayout or resize APIs to reset to default size. Shouldn't require any changes from this library. :)