diff options
author | 2018-01-05 18:34:10 +0100 | |
---|---|---|
committer | 2018-01-05 18:34:10 +0100 | |
commit | 3010dc179123594c132b36b3620a9b651a141e63 (patch) | |
tree | ac339fb3d69df440433ba270b14a07641fdbf151 /src/components/ui/ImageUpload.js | |
parent | feat(Service): Add custom service icon upload (diff) | |
download | ferdium-app-3010dc179123594c132b36b3620a9b651a141e63.tar.gz ferdium-app-3010dc179123594c132b36b3620a9b651a141e63.tar.zst ferdium-app-3010dc179123594c132b36b3620a9b651a141e63.zip |
Fix issue when deleting and reuploading an icon
Diffstat (limited to 'src/components/ui/ImageUpload.js')
-rw-r--r-- | src/components/ui/ImageUpload.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index 08809f007..a239095c0 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -26,12 +26,16 @@ export default class ImageUpload extends Component { | |||
26 | } | 26 | } |
27 | 27 | ||
28 | onDrop(acceptedFiles) { | 28 | onDrop(acceptedFiles) { |
29 | const { field } = this.props; | ||
30 | |||
29 | acceptedFiles.forEach((file) => { | 31 | acceptedFiles.forEach((file) => { |
30 | this.setState({ | 32 | this.setState({ |
31 | path: file.path, | 33 | path: file.path, |
32 | }); | 34 | }); |
33 | this.props.field.onDrop(file); | 35 | this.props.field.onDrop(file); |
34 | }); | 36 | }); |
37 | |||
38 | field.set(''); | ||
35 | } | 39 | } |
36 | 40 | ||
37 | dropzoneRef = null; | 41 | dropzoneRef = null; |