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

If I set cellHeight to some vh, only first grid will take vh, rest will use px #1217

Closed
ferretwithaberet opened this issue Mar 16, 2020 · 2 comments

Comments

@ferretwithaberet
Copy link
Contributor

Subject of the issue

If I set cellHeight to a vh measure, like 7vh, only the first grid will be initialized with 7vh, others will use 7px for some reason.

Your environment

1.1.0 Newest, served from CDN
Brave Version 1.4.96 Chromium: 80.0.3987.132 (Official Build) (64-bit)

Steps to reproduce

  1. Make multiple grids.
  2. Gridstack options should contain a vh unit for the cellHeight property, like '7vh'
  3. Initialize them with Gridstack.initAll(options).

Expected behaviour

All grids should have a height of 84vh.

Actual behaviour

First grid has a height of 84vh, others have 84px.

@ferretwithaberet
Copy link
Contributor Author

#1218 Should fix it

adumesny pushed a commit that referenced this issue Mar 16, 2020
* Made '.initAll()' use a deep copy of the opts
@adumesny
Copy link
Member

adumesny commented Mar 16, 2020

thank you for the fix! next time please create a simple jsfiddle so I can debug the issue. seems like the shared opts unit conversion should have gone to the others...

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