Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dropzone

Package Overview
Dependencies
Maintainers
2
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dropzone - npm Package Compare versions

Comparing version 10.0.4 to 10.0.5

6

dist/es/index.js

@@ -527,3 +527,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

if (event.dataTransfer) {
event.dataTransfer.dropEffect = 'copy';
try {
event.dataTransfer.dropEffect = 'copy';
} catch (_unused) {}
/* eslint-disable-line no-empty */
}

@@ -530,0 +534,0 @@

2

package.json

@@ -168,3 +168,3 @@ {

},
"version": "10.0.4",
"version": "10.0.5",
"engines": {

@@ -171,0 +171,0 @@ "node": ">= 8"

@@ -500,3 +500,5 @@ /* eslint prefer-template: 0 */

if (event.dataTransfer) {
event.dataTransfer.dropEffect = 'copy'
try {
event.dataTransfer.dropEffect = 'copy'
} catch {} /* eslint-disable-line no-empty */
}

@@ -503,0 +505,0 @@

@@ -431,2 +431,38 @@ /* eslint react/prop-types: 0 */

})
test('refs are set when {refKey} is set to a different value', done => {
const data = createDtWithFiles(files)
class MyView extends React.Component {
render() {
const { children, innerRef, ...rest } = this.props
return (
<div id="dropzone" ref={innerRef} {...rest}>
<div>{children}</div>
</div>
)
}
}
const ui = (
<Dropzone>
{({ getRootProps }) => (
<MyView {...getRootProps({ refKey: 'innerRef' })}>
<span>Drop some files here ...</span>
</MyView>
)}
</Dropzone>
)
const { container } = render(ui)
const dropzone = container.querySelector('#dropzone')
const fn = async () => {
fireDrop(dropzone, data)
await flushPromises(ui, container)
done()
}
expect(fn).not.toThrow()
})
})

@@ -433,0 +469,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc