johnwalley / allotment

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

Change onReset callback logic #714

Open OliverWall opened 1 year ago

OliverWall commented 1 year ago

Hi. Could you change the logic of the onReset callback. I expect that it will reset the panel size to default, but the callback will be called after the reset occurs. This is useful if we are storing panel values in localStorage and I need to know what value should be reset. It would also be cool to pass sizes like onDragEnd

https://github.com/johnwalley/allotment/blob/main/src/allotment.tsx#L182

bboure commented 9 months ago

I have the same use case. I also expected the panes to be resized and onReset() called with the new sizes.

riazus commented 6 months ago

The same problem. Are there updates of this issue?