All Versions
82
Latest Version
Avg Release Cycle
74 days
Latest Release
725 days ago

Changelog History
Page 1

  • v4.4.5 Changes

    April 26, 2022
    • ๐Ÿ›  Fix: grid prop unused in handleDragStop #621
    • ๐Ÿ›  Fix: children prop missing in TypeScript definition #648
    • โšก๏ธ Internal: Various devDep updates
  • v4.4.4 Changes

    August 27, 2021
    • ๐Ÿ›  Fix: Ensure documentElement.style actually exists. Fixes crashes in some obscure environments. #574 #575
    • ๐Ÿ›  Fix: Add react/react-dom as peerDependencies again to fix Yarn PnP
    • Size: Replace classnames with clsx to save a few bytes
    • โœ… Internal: Additional tests on ref functionality and additional README content on nodeRef
    • โšก๏ธ Internal: Lots of devDependencies updates
    • ๐Ÿ“„ Docs: Various README and demo updates, see git commits
  • v4.4.3 Changes

    June 08, 2020
    • โž• Add nodeRef to TypeScript definitions
  • v4.4.2 Changes

    May 14, 2020
    • ๐Ÿ›  Fix: Remove "module" from package.json (it is no longer being built)
      • Fixes #482
  • v4.4.1 Changes

    May 12, 2020
    • ๐Ÿ›  Fix: Remove "module" definition in package.json
      • Giving up on this: there isn't a great reason to publish modules here as they won't be significantly tree-shook, and it bloats the published package.
      • Fixes incompatiblity in 4.4.0 with webpack, where webpack is now selecting "module" because "browser" is no longer present.
  • v4.4.0 Changes

    May 12, 2020
    • โž• Add nodeRef:
      • If running in React Strict mode, ReactDOM.findDOMNode() is deprecated. Unfortunately, in order for <Draggable> to work properly, we need raw access to the underlying DOM node. If you want to avoid the warning, pass a nodeRef as in this example: js function MyComponent() { const nodeRef = React.useRef(null); return ( <Draggable nodeRef={nodeRef}> <div ref={nodeRef}>Example Target</div> </Draggable> ); } This can be used for arbitrarily nested components, so long as the ref ends up pointing to the actual child DOM node and not a custom component. Thanks to react-transition-group for the inspiration. nodeRefis also available on`.
    • โœ‚ Remove "browser" field in "package.json":

      React components like react-draggable are built to do minimal raw DOM manipulation, and to always gate this behind conditionals to ensure that server-side rendering still works. We don't make any changes to any of that for the "browser" build, so it's entirely redundant.

      This should also fix the "Super expression must either be null or a function" error (#472) that some users have experienced with particular bundler configurations.

      The browser build may still be imported at "build/web/react-draggable.min.js". This is to prevent breakage only. The file is no longer minified to prevent possible terser bugs.

      • The browser build will likely be removed entirely in 5.0.
    • ๐Ÿ›  Fix: Make bounds optional in TypeScript #473

  • v4.3.1 Changes

    April 11, 2020

    ๐Ÿ›  > This is a bugfix release.

    • Happy Easter!
    • ๐Ÿ›  Fixed a serious bug that caused <DraggableCore> not to pass styles.
      • React.cloneElement has an odd quirk. When you do: js return React.cloneElement(this.props.children, {style: this.props.children.props.style}); , style ends up undefined.
    • ๐Ÿ›  Fixed a bug that caused debug output to show up in the build.
      • babel-loader cache does not invalidate when it should. I had modified webpack.config.js in the last version but it reused stale cache.
  • v4.3.0 Changes

    April 10, 2020
    • ๐Ÿ›  Fix setState warning after dismount if drag still active. Harmless, but prints a warning. #424
    • ๐Ÿ›  Fix a long-standing issue where text inputs would unfocus upon dismounting a <Draggable>.
      • Thanks @schnerd, #450
    • ๐Ÿ›  Fix an issue where the insides of a <Draggable> were not scrollable on touch devices due to the outer container having touch-action: none.
      • This was a long-standing hack for mobile devices. Without it, the page will scroll while you drag the element.
      • The new solution will simply cancel the touch event e.preventDefault(). However, due to changes in Chrome >= 56, this is only possible on non-passive event handlers. To fix this, we now add/remove the touchEvent on lifecycle events rather than using React's event system.
      • #465
    • ๐Ÿ”’ Upgrade devDeps and fix security warnings. None of them actually applied to this module.
  • v4.2.0 Changes

    December 02, 2019
    • ๐Ÿ›  Fix: Apply scale parameter also while dragging an element. #438
    • ๐Ÿ›  Fix: Don't ship process.env.DRAGGABLE_DEBUG checks in cjs/esm. #445
  • v4.1.0 Changes

    October 25, 2019
    • โž• Add "module" to package.json. There are now three builds:
      • "main": ES5-compatible CJS build, suitable for most use cases with maximum compatibility.
      • For legacy reasons, this has exports of the following shape, which ensures no surprises in CJS or ESM polyfilled environments: js module.exports = Draggable; module.exports.default = Draggable; module.exports.DraggableCore = DraggableCore;
      • "web": Minified UMD bundle exporting to window.ReactDraggable with the same ES compatibility as the "main" build.
      • "module": ES6-compatible build using import/export.

    This should fix issues like https://github.com/STRML/react-resizable/issues/113 while allowing modern bundlers to consume esm modules in the future.

    No compatibility changes are expected.