Topic: Carousel
ivonapilcevic asked 4 years ago
Expected behavior: I am using MDBReact Carousel with thumbnails, and if i just copy it from website it wokrs fine, but I need my images to be dynamic, so I use map function, but then it doesn't work.
Actual behavior: When I use map function inside MDBCarouselInner, like so:
<MDBCarouselInner>
{images.map((image, id) => (
<MDBCarouselItem itemId={id}>
<img
className="d-block w-100"
src={image.url}
alt="First slide"
/>
</MDBCarouselItem>
))}
</MDBCarouselInner>
the Carousel just doesnt work properly. It doesn't render all available images, and last slide is empty. Can you please help me solve this problem?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.27.0
- Device: MacBook Pro
- Browser: Chrome, Safari, Mozzila
- OS: MacOs
- Provided sample code: No
- Provided link: No
Piotr Glejzer staff commented 4 years ago
Is just a prbolem with that if you use dynamic data from api?
Fruity Time commented 4 years ago
Had the same problem when using data from api.
Wojciech Staniszewski staff commented 4 years ago
Thanks for Your report, we will take a look at this problem, and fix it as soon as possible.