question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple slide doesnt show

See original GitHub issue

It only shows one slide. here is my code

https://codesandbox.io/s/wonderful-thompson-jp3p1?file=/src/App.js:0-963

import React, { useState } from "react";
import "./styles.css";
import Carousel, {
  slidesToShowPlugin,
  slidesToScrollPlugin
} from "@brainhubeu/react-carousel";
import "@brainhubeu/react-carousel/lib/style.css";

const Item = ({ name }) => {
  return <div className="item">{name}</div>;
};
const MyCarouselWithDots = () => {
  const [value, setValue] = useState(0);

  const onChange = (value) => {
    setValue(value);
  };

  return (
    <Carousel
      plugins={[
        "centered",
        "infinite",
        "arrows",
        {
          resolve: slidesToShowPlugin,
          options: {
            numberOfSlides: 2
          }
        },
        {
          resolve: slidesToScrollPlugin,
          options: {
            numberOfSlides: 2
          }
        }
      ]}
    >
      {Array(7)
        .fill("")
        .map((e, i) => (
          <Item key={i} name={i + 1} />
        ))}
    </Carousel>
  );
};

export default MyCarouselWithDots;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

2reactions
sinangurbuzcommented, Nov 10, 2020

Hi @hungdev ,

In your package.json file “@brainhubeu/react-carousel”: “1.19.26” When you use “npm i @brainhubeu/react-carousel” it will setup this version (1.19.26). But you must use v.2

Install it manually; “@brainhubeu/react-carousel”: “2.0.1”

It solved my issue. Have a nice day

0reactions
hungdevcommented, Nov 10, 2020

@sinangurbuz you are right! thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PPT does not show all the slides when I do the slide show
Show activity on this post. Go to the Slide Show menu, click Set Up Show. In Show Slide select ALL and Click OK....
Read more >
Troubleshooting PowerPoint Slide Numbering: How to fix ...
The Header and Footer dialogue box will open. If the 'Don't show on title slide' box is checked, the slide number will not...
Read more >
Slides don't show in Slide Show View - Steve Rindsberg/RDP
Go to Slide Show | Set up Slide Show. In the Show Slides section, choose All. The other options will cause PowerPoint to...
Read more >
Add, rearrange, duplicate, and delete slides in PowerPoint
For multiple slides: Press and hold Ctrl, and in the thumbnail pane on the left, select the slides. Release the Ctrl key.
Read more >
PowerPoint Slide Doesnt Move! - Presentation Process
Solution: Go to your slideshow tab > Custom Slideshow and check if you have any listed there and remove them. You would set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found