Skip to content

addGrid() does not recognize rem units for cell height #1794

Closed

Description

@cfcoder

Subject of the issue

I am using 10rem as my cell height in my grid. I set up for a save of the full serial data [ save(true, true) command ] into a variable fullSerialData, then without loading the page, i destroy the grid, then call the GridStack.addGrid() of that same serial name [ load(fullSerialData, true) ] and it sets the cellHeight to 10px instead of 10rem.

Your environment

  • version of gridstack.js gridstack@4.2.5 using HTML5 version
  • which browser/OS Brave Version 1.25.73 Chromium: 91.0.4472.106 (Official Build) (64-bit)

Steps to reproduce

https://jsfiddle.net/ve0sdunm/2/

  1. Run as is, it will work fine using 100px cellHeight.
  2. Change cellHeight in options to 10rem and run it again.

Expected behavior

Should set the cell height of the widget to 10rem.

Actual behavior

It instead sets it to 10px.

Activity

  1. added 2 commits that reference this issue on Sep 13, 2021
  2. adumesny commented on Sep 13, 2021

    @adumesny
    Member

    fixed in next release. don't forget to donate if you find this lib useful!

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions