Skip to content

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

Closed

Description

@ferretwithaberet

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.

Activity

  1. ferretwithaberet commented on Mar 16, 2020

    @ferretwithaberet
    ContributorAuthor

    #1218 Should fix it

  2. added a commit that references this issue on Mar 16, 2020
  3. adumesny commented on Mar 16, 2020

    @adumesny
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions