Update dependency react-draggable to v4 - #8
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
September 25, 2022 17:57
8ea2850 to
b780f59
Compare
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
November 20, 2022 21:23
b780f59 to
4602668
Compare
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
August 11, 2025 12:15
4602668 to
e071f68
Compare
1 task
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
May 30, 2026 19:30
e071f68 to
21c825d
Compare
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
June 20, 2026 16:02
21c825d to
0fe8e86
Compare
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
July 29, 2026 12:03
0fe8e86 to
93b5666
Compare
renovate
Bot
force-pushed
the
renovate/react-draggable-4.x
branch
from
September 20, 2026 03:04
93b5666 to
9199fab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.2.6→^4.0.0Release Notes
react-grid-layout/react-draggable (react-draggable)
v4.7.2Compare Source
moduleResolution: node16/nodenextno longer resolve the CommonJS type declaration. Theexportsmap carried a single condition-independent"types"key, so theimportentry was typed bybuild/cjs/cjs.d.ts— a CJS declaration, since the package has no"type": "module"— which made a default import resolve to the module namespace and<Draggable>fail with TS2604/TS2786. Each condition now declares its owntypes, pointing the ESM entry at thecjs.d.mtstsup already emits. Regression in 4.6.0; types-only, no runtime change. (closes #816)exportstypes each condition separately, and type-checks a real ESM consumer against the built package undernodenext— resolving throughexportsrather than apathsmapping, which is what let this regression through.4.7.1 (Jul 28, 2026)
propTypesstatic was a required member of the public type; React 18's JSXLibraryManagedAttributesconsultspropTypeswhen it is required, and doing so cancels the optionalitydefaultPropsnormally grants. React 19 ignorespropTypes, which is why the v19-only type check missed it.make lintnow also type-checks the public surface against@types/react@18. (#809, closes #807)processaccess in the debug logger so browser bundlers that do not shimprocessno longer crash on import. (#810, closes #806)4.7.0 (Jun 18, 2026)
nonceprop to support a strict Content Security Policy. It's applied to the dynamically-injected user-select<style>element so astyle-srcpolicy without'unsafe-inline'no longer blocks it. When omitted, webpack's__webpack_nonce__global is used if available.enableUserSelectHack={false}remains a no-prop opt-out. (#808, closes #791)tsccompilation in the build/CI pipeline.4.6.0 (May 29, 2026)
module.exports === Draggable, plus.defaultand.DraggableCore), the UMDReactDraggableglobal, and the shipped type surface are all unchanged. (#805)exportsmap alongside the existing CommonJS entry, so the package can be imported natively in both module systems. (#805)4.5.0 (Jun 25, 2025)
4.4.6 (Sep 27, 2023)
4.4.5 (Apr 26, 2022)
gridprop unused inhandleDragStop#621childrenprop missing in TypeScript definition #6484.4.4 (Aug 27, 2021)
documentElement.styleactually exists. Fixes crashes in some obscure environments. #574 #575peerDependenciesagain to fix Yarn PnPclassnameswithclsxto save a few bytesreffunctionality and additional README content onnodeRef4.4.3 (June 8, 2020)
nodeRefto TypeScript definitions4.4.2 (May 14, 2020)
4.4.1 (May 12, 2020)
here as they won't be significantly tree-shook, and it bloats
the published package.
selecting "module" because "browser" is no longer present.
4.4.0 (May 12, 2020)
nodeRef:Unfortunately, in order for
<Draggable>to work properly, we need raw accessto the underlying DOM node. If you want to avoid the warning, pass a
nodeRefas in this example:
pointing to the actual child DOM node and not a custom component.
Thanks to react-transition-group for the inspiration.
nodeRefis also available on<DraggableCore>.There is nothing special in the browser build that is actually practical
for modern use. The "browser" field, as defined in
https://github.com/defunctzombie/package-browser-field-spec#overview,
indicates that you should use it if you are directly accessing globals,
using browser-specific features, dom manipulation, etc.
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.
boundsoptional in TypeScript #4734.3.1 (Apr 11, 2020)
<DraggableCore>not to pass styles.React.cloneElementhas an odd quirk. When you do:styleends up undefined.babel-loadercache does not invalidate when it should. I had modified webpack.config.js in the last version but it reused stale cache.4.3.0 (Apr 10, 2020)
<Draggable>.<Draggable>were not scrollable on touch devices due to the outer container havingtouch-action: none.e.preventDefault(). However, due to changes in Chrome >= 56, this is only possible onnon-passive event handlers. To fix this, we now add/remove the touchEvent on lifecycle events rather than using React's event system.
4.2.0 (Dec 2, 2019)
scaleparameter also while dragging an element. #438process.env.DRAGGABLE_DEBUGchecks in cjs/esm. #4454.1.0 (Oct 25, 2019)
Add
"module"topackage.json. There are now three builds:"main": ES5-compatible CJS build, suitable for most use cases with maximum compatibility."web": Minified UMD bundle exporting towindow.ReactDraggablewith the same ES compatibility as the "main" build."module": ES6-compatible build using import/export.This should fix issues like STRML/react-resizable#113 while allowing modern bundlers to consume esm modules in the future.
No compatibility changes are expected.
4.0.3 (Sep 10, 2019)
4.0.2 (Sep 9, 2019)
4.0.1 (Sep 7, 2019)
4.0.0 (Aug 26, 2019)
getDerivedStateFromProps.classNames&prop-typesinto the build. This should result in marginally smaller bundle sizes for applications that use bundlers.3.3.2 (Aug 16, 2019)
all: inheritinstead ofbackground: transparent;to fix selection styles.3.3.1 (Aug 12, 2019)
componentWillMountdeprecation.3.3.0 (Apr 18, 2019)
positionOffsetprop, which can be Numbers (px) or string percentages (like"10%"). See the README for more.3.2.1 (Mar 1, 2019)
3.2.0 (Feb 27, 2019)defaultPositionnow allows string offsets (like {x: '10%', y: '10%'}) then calculates deltas from there. See the examples and the PR #361. Thanks to @tnrich and @eric-burel.DraggableEventtype for Flow consumers. Thanks @elie222.3.1.1 (Dec 21, 2018)
3.1.0 (Dec 21, 2018)
scaleprop (#352)3.0.5 (Jan 11, 2018)
3.0.4 (Nov 27, 2017)
3.0.3 (Aug 31, 2017)
import * as React(Flow best practice).3.0.2 (Aug 22, 2017)
.npmignore.3.0.1 (Aug 21, 2017)
3.0.0 (Aug 21, 2017)
<Draggable>is now exported asmodule.exportsandmodule.exports.default.user-select: noneon all elements while dragging. Instead,the
::selectionpsuedo element is used.x/yto callbacks. See #226.2.2.6 (Apr 30, 2017)
2.2.5 (Apr 28, 2017)
2.2.4 (Apr 27, 2017)
PropTypesaccess toprop-typespackage for React 15.5 (prep for 16)2.2.3 (Nov 21, 2016)
2.2.2 (Sep 14, 2016)
SVGElement, see #162ownerDocumentbeforeonStop, fixes #1982.2.1 (Aug 11, 2016)
getComputedStyleerror: see #186, #1902.2.0 (Jul 29, 2016)
offsetParentproperty for an arbitrary ancestor for offset calculations.offsetParent.2.1.2 (Jun 5, 2016)
return falseto cancelonDragbreaking on both old and new browsers due to missingtypeArgand/orunsupported
MouseEventConstructor. Fixes #164.2.1.1 (May 22, 2016)
<DraggableCore>wasn't calling back with the DOM node.2.1.0 (May 20, 2016)
handleorcancelselectors if the event originates from a child of the handle or cancel.2.0.2 (May 19, 2016)
cannot access clientX of undefinedon some touch-enabled platforms.#118
2.0.1 (May 19, 2016)
2.0.0 (May 10, 2016)
position/defaultPosition.global.SVGElement. Fixes JSDOM & #123.2.0.0-beta3 (Apr 19, 2016)
rely on them in their build and export their own comments.
2.0.0-beta2 (Apr 14, 2016)
<Draggable>s with apositionproperty will still be draggable, but will revert to their old positionon drag stop. Attach an
onStoporonDraghandler to synchronize state.<Draggable>controlled but attach no callbackhandlers, a warning will be printed.
2.0.0-beta1 (Apr 14, 2016)
Breaking Changes:
<DraggableCore>and<Draggable>have had their callback types changed and unified.startoption has been renamed todefaultPosition.zIndexoption has been removed.Possibly Breaking Changes:
offsetParent.This method allows us to support arbitrary nested scrollable ancestors without scroll handlers!
Enhancements:
<Draggable>now has apositionattribute. Its relationship todefaultPositionis much likevaluetodefaultValueon 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.
1.4.0-beta1 (Apr 13, 2016)
1.3.7 (Apr 8, 2016)
user-selectprefixing, which may be different than the prefix required fortransform.1.3.6 (Apr 8, 2016)
1.3.5 (Apr 8, 2016)
<Draggable>supports bothv0.14andv15.user-selectstyle that is created on the<body>while dragging.1.3.4 (Mar 5, 2016)
1.3.3 (Feb 11, 2016)
1.3.2 (Feb 11, 2016)
1.3.1 (Feb 10, 2016)
1.3.0 (Feb 10, 2016)
<Draggable>firesdragevents, as they should have been.'none'axis type. This allows using<Draggable>somewhat like<DraggableCore>- state will be keptinternally (which makes bounds checks etc possible), but updates will not be flushed to the DOM.
1.2.0 (Feb 5, 2016)
'parent', you can select any elementon the page, including
'body'.<Draggable>is unmounted while dragging.came back. This is due to how
<DraggableCore>handles deltas only and does not keep state. Added new stateproperties
slackXandslackYto<Draggable>to handle this and restore pre-v1 behavior.1.1.3 (Nov 25, 2015)
window1.1.2 (Nov 23, 2015)
<Draggable>was calling back with clientX/Y, not offsetX/Y as it did pre-1.0. This unintendedbehavior has been fixed and a test has been added.
1.1.1 (Nov 14, 2015)
NaNwas returning from scroll events due to event structure change.1.1.0 (Nov 14, 2015)
gridinto<DraggableCore>directly. It will continue to work on<Draggable>.1.0.2 (Nov 7, 2015)
enableUserSelectHacknot properly disabling.1.0.1 (Oct 28, 2015)
allowAnyClickoption to allow other click types.1.0.0 (Oct 27, 2015)
resetState()instance methodmoveOnStartChangeprop0.14support only.<DraggableCore>element upon which<Draggable>is based.This module is useful for building libraries and is completely stateless.
0.8.5 (Oct 20, 2015)
0.8.4 (Oct 15, 2015)
transformattribute instead ofstyle. Thanks @martinRoss0.8.3 (Oct 12, 2015)
e.changedTouchescheck.0.8.2 (Sep 21, 2015)
0.8.1 (June 3, 2015)
resetState()instance method for use by parents. See README ("State Problems?").0.8.0 (May 19, 2015)
IE8 is still not supported, as it is not supported by React.
0.7.4 (May 18, 2015)
0,0would cause the element to remain in an inaccurate position,because the translation was removed from the CSS. See #55.
0.7.3 (May 13, 2015)
moveOnStartChangeoptimization that was causing problems when attempting to move a<Draggable>backto its initial position. See STRML/react-grid-layout#56
0.7.2 (May 8, 2015)
moveOnStartChangeproperty. See README.0.7.1 (May 7, 2015)
startparam is back. Pass{x: Number, y: Number}to kickoff the CSS transform. Useful in certaincases for simpler callback math (so you don't have to know its existing relative position and add it to
the dragged position). Fixes #52.
0.7.0 (May 7, 2015)
boundswith coordinates was confusing because it was using the item's width/height,which was not intuitive. When providing coordinates,
boundsnow simply restricts movement in eachdirection by that many pixels.
0.6.0 (May 2, 2015)
false.gridoption was active.user-select:nonehack to document.body for better highlight prevention.boundsoption to restrict dragging within parent or within coordinates.0.5.0 (May 2, 2015)
0.4.3 (Apr 30, 2015)
0.4.2 (Apr 30, 2015)
"browser"config to package.json for browserify imports (fix #45).emptyFunctionandReact.addons.classSetimports.0.4.1 (Apr 30, 2015)
reactdirectly).0.4.0 (Jan 03, 2015)
0.3.0 (Oct 21, 2014)
0.2.1 (Sep 10, 2014)
0.2.0 (Sep 10, 2014)
0.1.1 (Jul 26, 2014)
0.1.0 (Jul 25, 2014)
v4.7.1Compare Source
propTypesstatic was a required member of the public type; React 18's JSXLibraryManagedAttributesconsultspropTypeswhen it is required, and doing so cancels the optionalitydefaultPropsnormally grants. React 19 ignorespropTypes, which is why the v19-only type check missed it.make lintnow also type-checks the public surface against@types/react@18. (#809, closes #807)processaccess in the debug logger so browser bundlers that do not shimprocessno longer crash on import. (#810, closes #806)v4.7.0Compare Source
nonceprop to support a strict Content Security Policy. It's applied to the dynamically-injected user-select<style>element so astyle-srcpolicy without'unsafe-inline'no longer blocks it. When omitted, webpack's__webpack_nonce__global is used if available.enableUserSelectHack={false}remains a no-prop opt-out. (#808, closes #791)tsccompilation in the build/CI pipeline.v4.6.0Compare Source
module.exports === Draggable, plus.defaultand.DraggableCore), the UMDReactDraggableglobal, and the shipped type surface are all unchanged. (#805)exportsmap alongside the existing CommonJS entry, so the package can be imported natively in both module systems. (#805)v4.5.0Compare Source
v4.4.6Compare Source
v4.4.5Compare Source
gridprop unused inhandleDragStop#621childrenprop missing in TypeScript definition #648v4.4.4Compare Source
documentElement.styleactually exists. Fixes crashes in some obscure environments. #574 #575peerDependenciesagain to fix Yarn PnPclassnameswithclsxto save a few bytesreffunctionality and additional README content onnodeRefv4.4.3Compare Source
nodeRefto TypeScript definitionsv4.4.2Compare Source
v4.4.1Compare Source
here as they won't be significantly tree-shook, and it bloats
the published package.
selecting "module" because "browser" is no longer present.
v4.4.0Compare Source
nodeRef:Unfortunately, in order for
<Draggable>to work properly, we need raw accessto the underlying DOM node. If you want to avoid the warning, pass a
nodeRefas in this example:
pointing to the actual child DOM node and not a custom component.
Thanks to react-transition-group for the inspiration.
nodeRefis also available on<DraggableCore>.There is nothing special in the browser build that is actually practical
for modern use. The "browser" field, as defined in
https://github.com/defunctzombie/package-browser-field-spec#overview,
indicates that you should use it if you are directly accessing globals,
using browser-specific features, dom manipulation, etc.
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.
boundsoptional in TypeScript #473v4.3.1Compare Source
<DraggableCore>not to pass styles.React.cloneElementhas an odd quirk. When you do:styleends up undefined.babel-loadercache does not invalidate when it should. I had modified webpack.config.js in the last version but it reused stale cache.v4.3.0Compare Source
<Draggable>.<Draggable>were not scrollable on touch devices due to the outer container havingtouch-action: none.e.preventDefault(). However, due to changes in Chrome >= 56, this is only possible onnon-passive event handlers. To fix this, we now add/remove the touchEvent on lifecycle events rather than using React's event system.
v4.2.0Compare Source
scaleparameter also while dragging an element. #438process.env.DRAGGABLE_DEBUGchecks in cjs/esm. #445v4.1.0Compare Source
Add
"module"topackage.json. There are now three builds:"main": ES5-compatible CJS build, suitable for most use cases with maximum compatibility."web": Minified UMD bundle exporting towindow.ReactDraggablewith the same ES compatibility as the "main" build."module": ES6-compatible build using import/export.This should fix issues like STRML/react-resizable#113 while allowing modern bundlers to consume esm modules in the future.
No compatibility changes are expected.
v4.0.3Compare Source
v4.0.2Compare Source
v4.0.1Compare Source
v3.3.2Compare Source
all: inheritinstead ofbackground: transparent;to fix selection styles.v3.3.1Compare Source
componentWillMountdeprecation.v3.3.0Compare Source
positionOffsetprop, which can be Numbers (px) or string percentages (like"10%"). See the README for more.v3.2.1Compare Source
v3.1.1Compare Source
v3.1.0Compare Source
scaleprop (#352)v3.0.5Compare Source
v3.0.4Compare Source
v3.0.3Compare Source
import * as React(Flow best practice).v3.0.2Compare Source
.npmignore.v3.0.1Compare Source
v3.0.0Compare Source
<Draggable>is now exported asmodule.exportsandmodule.exports.default.user-select: noneon all elements while dragging. Instead,the
::selectionpsuedo element is used.x/yto callbacks. See #226.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.