Skip to content

Tags: seanpascoe/react-dropzone

Tags

v7.0.1

Toggle v7.0.1's commit message
fix: fix on file select dialog close behaviour (react-dropzone#707)

- do not invoke onFileDialogCancel cb if no files were selected, close react-dropzone#652

v7.0.0

Toggle v7.0.0's commit message
refactor: remove file preview and close react-dropzone#705

BREAKING CHANGE: File{preview} has been removed to avoid possible memory leaks

If you wish to create previews, you can easily achieve this in the `onDrop()` callback:
```js
class MyZone extends React.Component {
  onDrop = files => {
    this.setState({
      files: files.map(file => ({
        ...file,
        preview: URL.createObjectURL(file)
      }))
    });
  }

  cleanup = () => {
    // Revoke data uris when done using the previews
    const {files} = this.state;

    for (const file of files) {
      URL.revokeObjectURL(file.preview);
    }
  }

  render() {
    return (
      <Dropzone onDrop={this.onDrop} />
    );
  }
}

```

v6.2.4

Toggle v6.2.4's commit message
fix: fix event propagation and close react-dropzone#686

- persist event in callbacks where the event is passed down the custom callbacks
- do not call onDrop, onDragEnter callbacks if event propagation was stopped from a child

v6.2.3

Toggle v6.2.3's commit message
fix: fix types for getDataTransferItems()

v6.2.2

Toggle v6.2.2's commit message
fix: fix regression in PRs react-dropzone#673 and react-dropzone#695

- do not use synthetic default imports in typings, close react-dropzone#696
- invoke onDrop when called from input change, close react-dropzone#698
- add more tests to increase coverage

v6.2.1

Toggle v6.2.1's commit message
fix: improve onClick and disableClick props (fixes react-dropzone#530) (

react-dropzone#694)

- Let onClick callback on container propagate when `{disableClick }` is true
- Do not open file dialog if `.preventDefault()` was called on the event

v6.2.0

Toggle v6.2.0's commit message
feat: improve TypeScript setup

- add support for using {ref} with a RefObject
- run tsc on the .tsx test files
- add missing tsconfig.json file
- use default React export in .tsx files

v6.1.3

Toggle v6.1.3's commit message
fix: improve drag type detection and fix styling in Safari

- cleanup some of the tests
- apply different active styling when file type cannot be inferred and close react-dropzone#668
- use DataTransfer{types} for drag data type detection

v6.1.2

Toggle v6.1.2's commit message
fix: pass event to user-supplied inputProps {onClick}

v6.1.1

Toggle v6.1.1's commit message
fix: call setState before callbacks (react-dropzone#690)