react-grid-layout
Advanced tools
Changelog
0.18.2 (Feb 26, 2020)
shouldComponentUpdate
:
shouldComponentUpdate
was shipped in 0.18.0-0.18.1 (#1123), which did not compare the children
object. While this works well in many simple implementations of RGL, it breaks in more complex applications.props.children
and nextProps.children
is now added to <ReactGridLayout>
and <GridItem>
. If you wish to take advantage of the performance improvements from the shouldComponentUpdate
work, memoize your children.Changelog
0.18.1 (Feb 25, 2020)
This release contains typedef changes only.
<ReactGridLayout>
and <ResponsiveReactGridLayout>
exact.WidthProvider
.Changelog
0.18.0 (Feb 25, 2020)
Thanks to all of our maintainers for this big release. 0.18.0 contains a large number of bugfixes that users have been asking for. Please read the full list so you know what to expect. Some of the biggest improvements include fixing changes of isResizable
/isDraggable
without a remount (#892), fixes to prop changes on ResponsiveReactGridLayout
(#1090), shouldComponentUpdate
improvements for speed (#1123), improvements to droppability (#1127), and much more.
isDraggable
/isResizable
on a static
item and it will have that property. This could be useful, but be sure to check your layouts if you use static
. Relates to #1060.shouldComponentUpdate
is now implemented on major components to improve render speed while you manipulate the layout. In our testing there are no issues. If you encounter one, please open an issue asap and we'll get it fixed. See #1123.isDraggable
/isResizable
without the child component remounting. We do this by always rendering the child <Resizable>
and <Draggable>
wrappers, optionally in a disabled
state. This feature has been heavily requested. #892e
on the onDrop
callback. #1065transformScale
to Resizable
. #1075ResponsiveReactGridLayout
. #1090
layouts
prop. #1064isDraggable
/isResizable
on a GridItem
overrides the global setting on the layout. #1060String#includes
for Firefox test. #1096Added shouldComponentUpdate
to major elements for speed. Significant performance improvements while dragging. Started in #1032 and finished in #1123.
Internal refactor of dropping capability. It is now more predictable and uses similar unit labels (left
, top
) to other features. #1128
Upgrade devDependencies.
Remove ESPower from test suite (not useful with Jest).
0.17.1 (Oct 29, 2019)
Surround navigator
check in try/catch
to avoid problems with mocked navigators #1057
TransformScale is not applied properly while dragging an element #1046
0.17.0 (Oct 24, 2019)
It's been 18 months since the last release, and this is a pretty large one! For references on the items below, see https://github.com/STRML/react-grid-layout/milestone/1?closed=1.
Thanks to @daynin and @n1ghtmare for taking an active role in maintaining RGL, and for giving it a much-needed shot in the arm, and thanks to the rest of our contributors.
transformScale
prop #987<ResponsiveReactGridLayout>
now supports margin-per-breakpoint #1016onWidthChange
only called on breakpoint changes #770onDragStop
if an item is only clicked, not dragged #1023Both react-draggable
and react-resizable
dependencies are now React 16.9 compatible, as is now react-grid-layout
.
Webpack 4 #907
Babel 7 #1013
Flow 0.110 #995
Jest #774
Various build simplifications #773
Various PR bots - thanks @daynin
0.16.6 (Mar 8, 2018)
Fixed collision issue where items below could rearrange on a move.
Added a "Toolbox" demo (thanks @jhob)
0.16.5 (Feb 26, 2018)
Minor fix to isUserAction
on certain types of compaction cascades (#714, #720, #729)
0.16.4 (Feb 15, 2018)
Skip null items in processGridItem (#578)
Resize is broken for grids with preventCollision: true, fixes #655 (#656)
Minor refactoring
0.16.3 (Jan 31, 2018)
Fix overriding of onStart
behaviour (#707, thanks @ersel)
Fixed Flow type of WidthProvider
Devdep updates
0.16.2 (Dec 17, 2017)
Fix onLayoutChange
not firing properly due to regression introduced in 0.16.1
Simpler resize corner CSS (thanks @TrySound)
Reformat code with Prettier & simplify lint configs (thanks @TrySound)
0.16.1 (Dec 10, 2017)
Flow def upgrades (thanks @TrySound)
DevDep upgrades
Fixed WebpackBin demo
Addl test cases (thanks @torkelo)
0.16.0 (Oct 6, 2017)
Added horizontal compaction option, compactType
(thanks @Rhjulskov)
Added preventCollision
option for static grids (thanks @EmrysMyrddin)
0.15.2 (Sep 5, 2017)
Fix missed import *
Dependency updates
0.15.1 (Sep 5, 2017)
Fix React PropTypes & createClass warnings
See https://github.com/facebook/react/issues/10583
0.15.0 (Aug 21, 2017)
Package upgrades, including Webpack 3
Flow typedef upgrades for the 0.53 rework
Add faulty key value in duplicate key error message (#602)
0.14.7 (Jul 14, 2017)
Fixed a dragging bug when the grid container is scrollable. Thanks @chultquist.
Ref: https://github.com/STRML/react-grid-layout/pull/555
0.14.6 (Apr 19, 2017)
Fixed a bad publish (connectivity issue).
0.14.5 (Apr 19, 2017)
Moved to prop-types
package to avoid React.PropTypes deprecation in 15.5. Thanks @inverts!
0.14.4 (Mar 9, 2017)
WidthProvider
to satisfy Flow (and technically, this could be a Text node)Update Flow
0.14.3 (Feb 22, 2017)
Reverted #499; msTransform
is indeed correct. See discussion.
0.14.2 (Feb 22, 2017)
MSTranform
for IE. Thanks @dvoaviarison (#499)Update development dependencies and babel version.
0.14.1 (Feb 20, 2017)
Fixed a minor Flow type issue when a classnames
typedef is present.
Fixed a scoping issue when running make build-example
.
0.14.0 (Feb 13, 2017)
New test suite - thanks @nikolas
Dev Dependency updates
Committed yarn.lock
Added react-draggable
classname to draggable grid items.
0.13.9 (Oct 13, 2016)
Fixed sorting of layout items, which could be different in IE if two items have the same x & y coordinate.
See #369.
0.13.8 (Oct 13, 2016)
Fixed breakage introduced in 0.13.7
when items are added without a layout or data-grid
property.
See #368.
0.13.7 (Oct 3, 2016)
Fixed an error during layout sync if children was a keyed fragment or had nested arrays.
Fixed onLayoutChange
being called when layout didn't change.
Fixed some issues with input layout items being modified in-place rather than cloned.
Minor typos.
0.13.6 (Sep 26, 2016)
Fixed missing HTMLElement in onResize*
callbacks.
0.13.5 (Sep 9, 2016)
Fixed a few Flow typing errors in WidthProvider
.
0.13.4 (Sep 9, 2016)
Fixed potential call to ReactDOM.findDOMNode(this)
after unmount of WidthProvider
.
Fixed an issue where layout items using data-grid
could rearrange on mount depending on how they were ordered.
See #342 for reference.
0.13.3 (Aug 31, 2016)
Fixed lodash.isequal
import, which was ruined by case-insensitive HFS+ shakes fist
0.13.2 (Aug 31, 2016)
Diffing children in order to regenerate the layout now diffs the key
props and their order.
Only pass className
and style
to WidthProvider. Other props were not intended to be supported.
WidthProvider
-style HOC.babel-plugin-transform-flow-comments
had limited support for defining types like transpiled classes.
This has been updated to instead copy source to .js.flow
files, which preserves all type information.
0.13.1 (Aug 16, 2016)
Fix remaining propTypes
warnings.
0.13.0 (Aug 3, 2016)
_grid
property on DOM children generates an error.
To compensate, we now error on the same and suggest using data-grid
instead. Simply change any use of
_grid
to data-grid
, or add your properties to the layout.Fix React 15.3 warning re: propTypes.
0.12.7 (Jun 29, 2016)
Prevent extraenous rerenders in <ResponsiveReactGridLayout>
by using deep equality on layouts.
0.12.6 (Jun 5, 2016)
Fix blindingly obvious bug where mounted isn't set to true. Smack forehead.
0.12.5 (Jun 3, 2016)
Fixes for server rendering checksum failures.
0.12.4 (May 22, 2016)
Update to React-Draggable v2. Fixes: #241, #239, #24
v2 contains a number of bugfixes & enhancements for touchscreens, multitouch, and scrolling containers.
0.12.3 (May 3, 2016)
Bugfix: Rendering with new breakpoints
/cols
does not refresh the layout.
Fixes #208 - thanks @damienleroux
0.12.2 (May 1, 2016)
Bugfix: Fix warning about undefined useCSSTransforms
when server-rendering.
0.12.1 (Apr 19, 2016)
Bugfix: Don't set layout
twice on width change. See #217 - thanks @damienleroux
Enhancement: Add Flow type comments
0.12.0 (Apr 14, 2016)
<ReactGridLayout>
will no longer animate so severely on mount. See #212.
<WidthProvider>
, you may notice that the container's width still shunts on mount.
If you like, you may delay mounting by setting measureBeforeMount={true}
on the wrapped element. This
will eliminate the mounting animation completely.useCSSTransforms={this.state.mounted}
and toggle the mounting
flag. See 0-showcase.jsx
for an example.Set more permissive version ranges for <Draggable>
and <Resizable>
dependencies, as they are now stable
and will only introduce breaking changes on major version ticks.
0.11.3 (Apr 8, 2016)
Officially support React v15.
0.11.2 (Apr 6, 2016)
Bugfix: Draggable cancel selectors, see #203 - thanks @RiiD
README fixes, thanks @bravo-kernel & @ro-savage
0.11.1
Bugfix: <ResponsiveReactGridLayout>
was using stale data when synchronizing children with the layout
on a breakpoint change.
0.11.0
This release contains potentially breaking changes so I have updated the minor version (as per semver).
Breaking Changes:
<GridItem>
, such
as className
. To set a className
on a child, set it on the child directly and it will be merged.
This allows us to make better assumptions about the layout and use a faster cloning mechanism.handle
and cancel
selectors per item is no longer supported. If you need this, please
open a ticket and let me know your use case.Other changes:
Bugfix: <ResponsiveReactGridLayout>
onLayoutChange
callback data could still be stale.
Bugfix: Range error when building layout solely from _grid
properties.
0.10.11
and 0.10.10
have been unpublished.Removed redundant isPlaceholder
property from <GridItem>
.
README updates to clarify layout/_grid usage.
0.10.11
Bugfix: layouts
param on <ResponsiveReactGridLayout>
's onLayoutChange
could have stale data
for the current breakpoint.
0.10.10
Performance: Prevent V8 deopt in a few methods and add fast layout item cloning.
0.10.9
Bugfix: Typo in children comparison in CWRP. See #169.
Bugfix: Missing babel-preset-es2015 in dev.
0.10.8
Rebuild using ES2015 Loose Mode.
0.10.7
Bugfix: className
and style
props on grid children were being incorrectly dropped, a holdover
from when cloneWithProps()
used to do this merging for us. They are now merged.
0.10.6
Bugfix: If both props.layout
and props.children.length
change in the same tick,
props.layout would be clobbered. See #162
0.10.5
Bugfix/Enhancement: Margins were causing subtle error in some of the positioning calculations. This has been fixed.
0.10.4
Bugfix: Container height was calculated as less than expected due to improper addition of margin.
0.10.3
Bugfix: Round item positions even if they're currently resizing or dragging (#158, regression of #141)
Bugfix: Fix a positioning bug when margins are 0 (#160)
0.10.2
Bugfix: <RGL> would synchronize children with layout if the layout in props didn't match the state; this was meant to be a hook for the developer to supply a new layout. The incorrect check could cause the layout to reset if the parent rerendered. The check is now between the layout in nextProps and props.
Bugfix: Fixed a lot of resizing layout bugs; most of the fixes are in react-resizable.
Bugfix: Fixed incorrect typecheck on LayoutItem.i.
Bugfix: Make onLayoutChange fire appropriately (#155).
Bugfix: Fix <ResponsiveGridLayout>
not properly reverting when sizing the page up (#154).
Remove unused offsetX
and offsetY
from layouts.
Dependency updates.
0.10.1
Hotfix for default export incompatibility caused by Babel 6.
0.10.0
This long-awaited release provides React 0.14 compatibility and a rewrite of the underlying
<Draggable>
functionality.
Breaking changes:
ListensToWidth
replaced with WidthProvider
which must wrap
<ResponsiveReactGridLayout>
and <ReactGridLayout>
to provide width data. See doc for example.initialWidth
renamed to width
.Other changes:
Finally compatible with React 0.14! Big thanks to @menelike for his help.
Upgraded to Babel 6.
Full typechecking via Flow.
Lots of misc bugfixes.
See beta releases below for more details.
0.10.0-beta1
Fixed a React import bug on ListensToWidth.jsx (#130; thanks @mrblueblue)
0.10.0-beta0
This release is unstable!
Known bugs: