Skip to content

Releases: react-grid-layout/react-draggable

2.0.0-beta3

08 Dec 01:08
f5d003c
Compare
Choose a tag to compare
  • 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

08 Dec 01:08
cb7d899
Compare
Choose a tag to compare
  • We're making a small deviation from React Core's controlled vs. uncontrolled scheme; for convenience,
    <Draggable>s with a position property will still be draggable, but will revert to their old position
    on drag stop. Attach an onStop or onDrag 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.

2.0.0-beta1

08 Dec 01:08
80144e5
Compare
Choose a tag to compare
  • 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 to defaultPosition.
  • 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 a position attribute. Its relationship to defaultPosition is much like
    value to defaultValue 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

08 Dec 01:08
0959b27
Compare
Choose a tag to compare
  • 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

08 Dec 01:08
0f644ea
Compare
Choose a tag to compare
  • Fix user-select prefixing, which may be different than the prefix required for transform.

1.3.6

08 Dec 01:08
9a2817b
Compare
Choose a tag to compare
  • Republished after 1.3.5 contained a bundling error.

1.3.5

08 Dec 01:08
60482f7
Compare
Choose a tag to compare
  • Add React v15 to devDeps. <Draggable> supports both v0.14 and v15.
  • 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.
  • Internal: Test fixes.

1.3.4

08 Dec 01:08
2c75bc8
Compare
Choose a tag to compare
  • Bugfix: Scrolling while dragging caused items to move unpredictably.

1.3.3

08 Dec 01:08
471f96b
Compare
Choose a tag to compare
  • Bugfix: #116: Android/Chrome are finicky; give up on canceling ghost clicks entirely.

1.3.2

08 Dec 01:08
1264806
Compare
Choose a tag to compare
  • Bugfix: #116: Child inputs not focusing on touch events.