Re-Flex icon indicating copy to clipboard operation
Re-Flex copied to clipboard

minSize ignored on window resize and initial render

Open GordonSmith opened this issue 4 years ago • 2 comments

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...

GordonSmith avatar Jul 22 '21 09:07 GordonSmith

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.

leefsmp avatar Jul 23 '21 06:07 leefsmp

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:

  1. Drag splitter to min size (to the top)
  2. Resize window to make it smaller
  3. Note that the top size is now less than the minSize

GordonSmith avatar Jul 23 '21 07:07 GordonSmith