Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i add multiple images that i already have the path to the component? #138

Open
bebru2k1 opened this issue Jul 12, 2022 · 1 comment

Comments

@bebru2k1
Copy link

how do i add multiple images that i already have the path to the component?

@AlDiAlisel
Copy link

AlDiAlisel commented Aug 4, 2022

if i have understand correctly the question you can create your own list of images and after you can iterate that on the compenent(1), if you wanna add after the uploaded images on your own list you can do this in the onChange(2) function

(2)
<ImageUploading
multiple
value={images}
onChange={onChange}
(2)
const onChange = (imageList, addUpdateIndex) => {
setYourOwnList([...yourOwnList,imageList[addUpdateIndex].data_url])
}

(1)
yourOwnList.map((image, index) => (

<img
src={image}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants