Search code examples
react-grid-layout

ResponsiveGridLayout static items leave HUGE gap (unusable)


Not sure what to do, has anyone run into this?

When grid items are static, it leaves a BIG gap before the items: https://codesandbox.io/s/hungry-dawn-cww14

When grid items are NOT static, everything seems fine: https://codesandbox.io/s/relaxed-dhawan-2xs1l


Solution

  • Adding isDraggable, isRearrangeable, and isResizable seems to fix it. But there is still a bug. I noted it here.

    <ResponsiveGridLayout
        className="pageGraphs"
        breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}
        cols={{ lg: 2, md: 2, sm: 2, xs: 1, xxs: 1 }}
        isDraggable={false}
        isRearrangeable={false}
        isResizable={false}
        style={{}}
    >