extra blank slide when using array
See original GitHub issueI seem to be getting a blank slide at the end when using a dynamic array to generate my slides.
import React, {PropTypes} from 'react'
import OwlCarousel from 'react-owl-carousel'
class Carousel extends React.Component {
constructor(props) {
super(props);
this.options = {
autoplay: true,
loop: true,
nav:true,
}
}
render() {
return (<OwlCarousel className="owl-theme" {...this.options}>
{this.props.slideItems.map((item, idx) => {
let image = <img src={item.src} alt={item.alt ? item.alt : `Carousel Image #${idx}`} className={'image' + idx}/>
return (
<a key={idx} href={item.href} style={slideStyle} data-event={item.dataEvent} data-value={item.dataValue}>
{image}
</a>
)
})}
</OwlCarousel>)
}
}
export default Carousel
I have verified that my array only returns 4 results, but the carousel is generating 5 items with a blank one at the end.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:9
Top Results From Across the Web
extra blank slide when using array · Issue #17 - GitHub
I have verified that my array only returns 4 results, but the carousel is generating 5 items with a blank one at the...
Read more >angular-carousel adds extra empty slide at end of carousel
I'm using a directive to set the height of the carousel to the tallest image, but it has the same issue whether or...
Read more >extra blank slide keeps appearing in powerpoint manual ...
After every few slides there appears a blank slide which I have to navigate through with an extra click.
Read more >Flexslider empty slide - WordPress Stack Exchange
I'm using flexslider with wp and my slider have 2 slides in view as one, the problem is when i have Steady number...
Read more >Swiper API
Additional required wrapper --> <div class="swiper-wrapper"> <! ... If false , then the only way to switch the slide is use of external...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having the same issue, I was resolved it by checking array length code as follows: ```
Checking the array length works.