-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Is there a way to update the component when the data changes?
I call the component like this:
<ImageGallery items={QuoteGallery} lazyLoad={true} />
I populate the gallery array in this function which is called before rendering
function getGallery() {
const wesiteMediaUrl = "https://website.com/media";
imgGallery = somObjectData.gallery.map((image) => {
return {
original: wesiteMediaUrl + image,
thumbnail: wesiteMediaUrl + image
};
});
}
When a dropdown changes i call the getGallery function to update the data in imgGallery but only the thumbnails are updated, not the main image.
How do i make the component redraw the thumbnails and main image when the imgGallery changes?
Metadata
Metadata
Assignees
Labels
No labels