- Reupload package to work around minor file metadata issue caused by Yarn (yarnpkg/yarn#8109). This version contains no other changes.
- Added
draggedItem
parameter to theonDragStart
andonDragEnd
callback props.
- Updated peerDependencies list to mark compatibility with React 17.
- Updated to use immutability-helper 3.0.
- Fixed issue where the DraggableList could have an incorrect height during drag depending on the styling of its parents.
- React v16.6+ is now required.
- The
dragHandle
function prop was removed. Now the Template component is instead given a propdragHandleProps
which is an object that must be spread as props on the HTML element to be used as the drag handle.
ReactDraggableList v3:
<div>
{this.props.dragHandle(<div>drag me</div>)}
<div>content</div>
</div>
ReactDraggableList v4:
<div>
<div {...this.props.dragHandleProps}>drag me</div>
<div>content</div>
</div>
- No longer uses any deprecated APIs (lifecycle methods and ReactDOM.findDOMNode).
- Fixed bug where the
oldIndex
parameter passed toonMoveEnd
was incorrect if thelist
prop was updated while the user was dragging an item.
- Added TypeScript type definitions.
- Changed Flow type definitions to use
$ReadOnlyArray
where applicable. Users may need to change the type annotations on the function they give to theonMoveEnd
prop to keep Flow's type-check passing.
- Added
constrainDrag
prop. #30
- Updated for compatibility with Flow v0.72.
- Improved Flow type definitions to cover the proper return type of
getItemInstance
.
- Fixed accidental usage of
event
global variable. This didn't cause any user-visible bugs to my knowledge.
- Flow types for DraggableList now include a type parameter representing the list item's type, enabling fuller type-checking coverage.
- Updated package.json to mark compatibility with React v16.
- Internal: tests now use React v16.
- Updated for compatibility with Flow v0.54.1. This made it incompatible with older versions of Flow, so I'm making this update be a semver-minor change so users still on an older Flow version can pin to the previous minor version. Because of its frequent changes, I'm not considering incompatibilities with old Flow versions as semver-major breaking changes.
- Updated for compatibility with Flow v0.49.1.
- Stop using the newly deprecated
React.PropTypes
and now use the separate prop-types module.
- Fixed issue where components didn't re-render when the value of the
commonProps
prop changed. #20
- Added
autoScrollMaxSpeed
andautoScrollRegionSize
props to DraggableList. #15 - Added
commonProps
prop to DraggableList. #18
- Updated for compatibility with Flow v0.41.
- Updated for compatibility with Flow v0.38.
- Fixed issue with the dragged item itself being removed during the post-drag animation.
- Fixed handling of items being removed from list during the post-drag animation.
- Added
getItemInstance
method.
- Fixed Flow type-checking issue when used with newer version of react-motion.
- Updated for compatibility with Flow v0.32.
- Updated for compatibility with Flow v0.30.
- Fixed handling of props being changed while the user is dragging an item.
- Fixed issue where DraggableList could prevent elements from having a natural layout applied after being dragged when the container prop was not used.
- React v15 is now required.
- Added
unsetZIndex
prop.
- If the
getDragHeight
method isn't present on the template component, the drag height now defaults to the element's natural height instead of the arbitrary height of 30px.
- Fixed the DraggableList element changing height when the last item is grabbed.
- Re-use dragHandle prop value given to component to reduce amount of re-renders.
- Fixed a scroll animation glitch when DraggableList was not in a scrollable container.
- Fixed an accuracy issue with the scroll animation on drop.
- Fixed animation glitch if you pick up an item while it's still animating.
- Efficiency improvements: minimize amount of re-renders needed during dragging.
Initial stable release.