Releases: react-grid-layout/react-draggable
Releases · react-grid-layout/react-draggable
2.0.0-beta3
- Flow comments are now in the build. Other projects, such as React-Grid-Layout and React-Resizable, will
rely on them in their build and export their own comments.
2.0.0-beta2
- We're making a small deviation from React Core's controlled vs. uncontrolled scheme; for convenience,
<Draggable>
s with aposition
property will still be draggable, but will revert to their old position
on drag stop. Attach anonStop
oronDrag
handler to synchronize state.- A warning has been added informing users of this. If you make
<Draggable>
controlled but attach no callback
handlers, a warning will be printed.
- A warning has been added informing users of this. If you make
2.0.0-beta1
- Due to API changes, this is a major release.
Breaking Changes:
- Both
<DraggableCore>
and<Draggable>
have had their callback types changed and unified.
type DraggableEventHandler = (e: Event, data: DraggableData) => void | false;
type DraggableData = {
node: HTMLElement,
// lastX + deltaX === x
x: number, y: number,
deltaX: number, deltaY: number,
lastX: number, lastY: number
};
- The
start
option has been renamed todefaultPosition
. - The
zIndex
option has been removed.
Possibly Breaking Changes:
- When determining deltas, we now use a new method that checks the delta against the Draggable's
offsetParent
.
This method allows us to support arbitrary nested scrollable ancestors without scroll handlers!- This may cause issues in certain layouts. If you find one, please open an issue.
Enhancements:
<Draggable>
now has aposition
attribute. Its relationship todefaultPosition
is much like
value
todefaultValue
on React<input>
nodes. If set, the position is fixed and cannot be mutated.
If empty, the component will manage its own state. See #140
for more info & motivations.- Misc. bugfixes.
1.4.0-beta1
- Major improvements to drag tracking that now support even nested scroll boxes.
- This revision is being done as a pre-release to ensure there are no unforeseen issues with the offset changes.
1.3.7
1.3.6
1.3.5
- Add React v15 to devDeps.
<Draggable>
supports bothv0.14
andv15
. - Enhancement: Clean up usage of browser prefixes; modern browsers will no longer use them.
- This also removes the duplicated
user-select
style that is created on the<body>
while dragging.
- This also removes the duplicated
- Internal: Test fixes.