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

measureBeforeMount doesn't work with containerPadding={[0, 0]} #1983

Open
Spacerat opened this issue Nov 15, 2023 · 1 comment
Open

measureBeforeMount doesn't work with containerPadding={[0, 0]} #1983

Spacerat opened this issue Nov 15, 2023 · 1 comment

Comments

@Spacerat
Copy link

Describe the bug

From 1.4.0 onwards, if I set both: containerPadding={[0, 0]} and measureBeforeMount, the width of all items is set to 0.

This can be seen in the linked codesandbox.

Your Example Website or App

https://codesandbox.io/s/objective-stonebraker-r375cw?file=/src/ShowcaseLayout.js

Steps to Reproduce the Bug or Issue

  • Use v1.4+
  • Set containerPadding={[0, 0]}
  • Set measureBeforeMount

Expected behavior

I would expect to see the same thing I get as I would with containerPadding={[1, 1]}, but with 1px less padding.

react-grid-layout library version

1.4.0+

Operating System Version

MacOS

Browser

Chrome

Additional context

No response

Screenshots or Videos

Screenshot 2023-11-15 at 2 44 21 PM

@cnorthfield
Copy link

This issue also affects the placeholder size width (sets it to 0).

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

No branches or pull requests

2 participants