nomcopter / react-mosaic

A React tiling window manager
https://nomcopter.github.io/react-mosaic/
Other
4.39k stars 226 forks source link

Feature Request: register callback to additionalControls #180

Closed jack-tutor closed 2 years ago

jack-tutor commented 2 years ago

I want to cache in local storage whether or not the additionalControls are open. This is so if the page is refreshed, the additional controls remain open or closed as they were before.

To do this, I either need to implement my own additionalControls button (and disable the existing button) OR have some type of useChange callback that responds to the change of additionalControls (this is what I would prefer). I suppose a simple getter for this state would somewhat work, that would be better than nothing.

Then on reload of the site, I could use the provided setAdditionalControlsOpen function to set the desired additional controls state.

I can imagine lots of other use cases for a callback on the additionalControls.

nomcopter commented 2 years ago

Implemented in v5.2.0