react-mosaic
react-mosaic copied to clipboard
minimumPaneSizePercentage clamp with the header minimum.
Feature ask
Currently we can't reduce a panel to zero because the props value by default is minimum 20%.
https://github.com/nomcopter/react-mosaic/blob/64b9d49a5bfc9bab4a01faba63a25168bb0f71da/src/Split.tsx#L31
I ask for have an option for customize the value, on both axis X and Y, the idea is to stack the panels on X, and keep 20% for Y axis, the vertical panels.
Current behavior
You can change the default pane size like this.
<Mosaic
resize={{ minimumPaneSizePercentage: 5 }}
...
/>
https://github.com/nomcopter/react-mosaic/blob/a80ebd407516e5b9040f8a943b9a41bd9da23835/src/types.ts#L59-L61
That's for sure, but the header size is not taken into account because the height value isn't dynamic. When we have a zoom in the browser the panel can't be resized.
Here two headers in purple, zoom 150% in Chrome.
Even with a lower zoom, 110%, the split component can't be selected.