Open TedSean opened 3 years ago
Hi! I was facing the exact same issue within a stepper and forked the project to add the feature to set state from props.
https://github.com/ftruzzi/react-images-upload
Install it with npm install --save 'https://gitpkg.now.sh/ftruzzi/react-images-upload/src/component'
, and use the two new props files
and pictures
to persist state. Note that pictures
replaces defaultImages
.
<ImageUploader
files={files}
pictures={pictures}
onChange={(files, pictures) => saveYourStateSomewhere(files, pictures)}
...
/>
@JakeHartnell would a PR be welcome?
Let's say we have a stepper and user uploads image and goes to next step. When user goes back to previous step, Image wouldn't stick to where it was uploaded. I think for this to work it may need to accept src attribute but I do not see any such props.