Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] re-resizable with minHeight set in "%" does not work #764

Closed
ej-toita opened this issue Mar 14, 2022 · 0 comments · Fixed by #765
Closed

[BUG] re-resizable with minHeight set in "%" does not work #764

ej-toita opened this issue Mar 14, 2022 · 0 comments · Fixed by #765

Comments

@ej-toita
Copy link
Contributor

Bug

Overview of the problem

I'm using re-resizable version [6.9.2]

My browser is: chrome

I am sure this issue is not a duplicate.

Description

Re-resizable fails to calculate parent size when

  • display: "flex",
  • flexDirection: "column"

styles are set on the parent DOM.
As a result, "maxHeight" props cannot be set in %.

This is simply because an inappropriate css style is set for "base" DOM-element:
https://codepen.io/shin-t/pen/WNdbGjm
it shrinks to zero as "flex-basis" style defaults to zero when you set it via "flex".
https://developer.mozilla.org/ja/docs/Web/CSS/flex

Steps to Reproduce

  1. First Step
  2. Second Step
  3. and so on...

See the codepen below:
https://codesandbox.io/s/re-resizable-bug-behavior-f3grus?file=/src/index.tsx

Drag-and-drop the lower boundary of resizable region.

Expected behavior

The resizable region resizes in vertical direction

Actual behavior

The resizable region resizes to zero height.
This buggy behavior fixes when I pass maxHeight in pixel or vh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant