Skip to content

Commit 68f39d7

Browse files
Siguraokonet
authored andcommitted
fix(react-dom): filter out acceptedFiles prop to remove React warning (react-dropzone#267)
* filter out `acceptedFiles` prop to remove warning * reorder customProps list by alphabet
1 parent 8acc7b2 commit 68f39d7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ class Dropzone extends React.Component {
263263

264264
// Remove custom properties before passing them to the wrapper div element
265265
const customProps = [
266-
'disablePreview', 'disableClick', 'onDropAccepted', 'onDropRejected', 'maxSize', 'minSize', 'onFileDialogCancel'
266+
'acceptedFiles',
267+
'disablePreview',
268+
'disableClick',
269+
'onDropAccepted',
270+
'onDropRejected',
271+
'onFileDialogCancel',
272+
'maxSize',
273+
'minSize'
267274
];
268275
const divProps = { ...props };
269276
customProps.forEach(prop => delete divProps[prop]);

0 commit comments

Comments
 (0)