Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-grid-layout

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-grid-layout - npm Package Versions

13
11

1.3.0

Diff

Changelog

Source

1.3.0 (Aug 27, 2021)

New Features

  • allowOverlap prop, when true, allows overlapping grid items. #1470
  • Add onDropDragOver callback. #1395
    • Use this callback to dynamically adjust the droppingItem based on what is being dragged over. Return w and h to adjust the item. It is then spread into the dropping placeholder.
    • This callback has the type:
      • onDragOver: (e: DragOverEvent) => { w: number, h: number } | false;
      • Return false to short-circuit the dragover.

Bugfixes

  • Remove sorting when compactType is null. #1474
  • Droppable fixes for Chrome behavior. #1442 #1448
  • Allow null children as a convenience so that inline expressions don't break the library. #1296
  • Various dependency upgrades.

Documentation

  • Add docs on using custom components as grid children.
  • Note required class on resizable handles for proper styling.
strml
published 1.2.5 •

Changelog

Source

1.2.5 (May 10, 2021)

Bugfixes

  • Ensure no negative positions are possible when compacting
  • Fix resizing on mobile. This was caused by the ref refactor to remove ReactDOM in 1.2.3.
    • Fixes #1458
    • Note: this upgrades react-resizable to 3.0.1, which like our other deps, is only compatible with React@>=16.3.

Documentation

  • Document new arity of resizeHandle ((axis: ResizeHandleAxis, ref: ReactRef<HTMLElement>) => React$Element)
  • Remove references to the deprecated verticalCompact prop
strml
published 1.2.4 •

Changelog

Source

1.2.4 (Mar 18, 2021)

This version fixes a serious render bug in <WidthProvider>. 1.2.3 should not be used.

Bugfixes

  • Fix failure to mount when layout is WidthProvider-wrapped and measureBeforeMount is true.
  • <WidthProvider> no longer updates grid with if it has been set to 0. This prevents unnecessary updates if the grid is set to display: none;. Thanks @405go #1427
strml
published 1.2.3 •

Changelog

Source

1.2.3 (Mar 16, 2021)

New Features

  • React-Grid-Layout is now fully compatible with <React.StrictMode>.
    • Usage of ReactDOM has been removed by using React.createRef() inside RGL, and the new nodeRef prop in react-draggable.
strml
published 1.2.2 •

Changelog

Source

1.2.2 (Mar 1, 2021)

Bugfixes

  • onResize as changed in 1.2.1 did not correctly save the layout. This is now fixed.
    • As you might guess, we need more test coverage! PRs are very welcome, I'll buy you beers on Cashapp or Patreon or whatever you like.
strml
published 1.2.1 •

Changelog

Source

1.2.1 (Mar 1, 2021)

Organization Changes

We have created the React-Grid-Layout Organization! Therefore the repository has moved.

This organization will grow as time goes on, and also contains the dependencies of RGL.

Bugfixes

  • Use classList in Firefox onDragOver hack. #1310
  • Fix scale property. As scale support was added to dependencies, this caused double-compensation for scale, causing the dragged element not to follow the cursor. #1393
  • Fix horizontal compact mode issue where it inadventently would compact the bottom of the grid. This is not useful nor intended. Thanks @s4m3. #1390
  • Fix onLayoutChange sometimes not triggering on resize. We weren't cloning the layout item before modifying it. Thanks @xcqwan. #1289

Internal Refactors

  • Updated to the latest versions of all dependencies (enzyme, webpack, jest, flow).
  • Held back React@17 as enzyme is not yet ready.
strml
published 1.2.0 •

Changelog

Source

1.2.0 (Nov 17, 2020)

New Features

  • You can now customize your resizable handle component as supported by react-resizable. For example:
<ReactGridLayout
  resizeHandle={<span className="custom-handle custom-handle-se" />}
  {...props}
/>

Thanks @typeetfunc #1303

Bugfixes

  • Fix onDrop handler not firing on Firefox if you drop over the placeholder.
    • Thanks @Charles-Lamoureux #1333
  • Various example style fixes #1283 #1299
strml
published 1.1.1 •

Changelog

Source

1.1.1 (Sep 10, 2020)

Republish to add dist/ folder for unpkg use.

strml
published 1.1.0 •

Changelog

Source

1.1.0 (Sep 3, 2020)

New Features

  • You can now place resizable handles on all corners. Use the resizeHandles prop, which is default ['se'] (for 'southeast').
    • Allowable values are:
      • 's' - South handle (bottom-center)
      • 'w' - West handle (left-center)
      • 'e' - East handle (right-center)
      • 'n' - North handle (top-center)
      • 'sw' - Southwest handle (bottom-left)
      • 'nw' - Northwest handle (top-left)
      • 'se' - Southeast handle (bottom-right)
      • 'ne' - Northeast handle (top-right)
    • These values may be combined, e.g. ['s', 'se', 'e'], to place three handles on the bottom side, bottom-right corner, and right side.

Bugfixes

  • Revert containerPadding change in #1138. This change was meant to be types-only, but it caused a behavioral change where the default value of containerPadding became [0, 0], not margin, which is default [10, 10].
  • Add a few more files to npmignore to improve package size.
strml
published 1.0.0 •

Changelog

Source

1.0.0 (July 20, 2020)

React-Grid-Layout has been in 0.x status for far too long. With the addition of some new features in this version and a breaking change, I thought it was time to move to a stable semver.

Breaking Changes

  • onDrop callback now has a form more consistent with other callbacks.
    • Previous type: (elemParams: { x: number, y: number, w: number, h: number, e: Event }) => void
    • New type: (layout: Layout, item: ?LayoutItem, e: Event) => void
    • Thanks @ceberhar #1169
  • Dropping Node 8 compatibility and testing due to devDep incompatibilities

New Features

  • Add innerRef: React.Ref<'div'> prop to expose a ref for the grid layout's outer div. Thanks @paul-sachs #1176
  • Add isBounded property to prevent dragging items outside of the grid. Thanks @artembykov #1248

Bugfixes

  • Fix grid items stuck using percentages on first render. Thanks @rhbg #1246
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc