Re-Flex
Re-Flex copied to clipboard
minSize ignored on window resize and initial render
If I set minSize to say 100, it is honoured when the splitter is moved, but if I resize the entire window it can get to less than 100...
Did you set windowResizeAware={true} on the ReflexContainer? I would need to see a concrete example to tell if something is wrong with your layout.
Setting windowResizeAware to true makes it worse!
FWIW I was unable to reproduce in a vanilla page - but did isolate my issue down to when using it within a flex enabled container (a Fluent UI "Stack" for example).
I have a distilled example here: https://codesandbox.io/s/sharp-dewdney-zkvpb?file=/src/index.js
I suspect I need an outer div around your ReflexContainer that resets some of the parentage flex values to make yours behave correctly?
Steps to reproduce:
- Drag splitter to min size (to the top)
- Resize window to make it smaller
- Note that the top size is now less than the minSize