Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

Single item pagination not hidden on type "fade" #1191

Open despecial opened 1 year ago

despecial commented 1 year ago

Checks

Version

4.1.4.

Description

Normally, if there is only 1 item active and the pagination option is set to true, the dot is hidden. When the type of splide is set to "fade", this is not the case.

Reproduction Link

https://jsfiddle.net/despecial/cL1etrjv/8/

Steps to Reproduce

  1. Set type to 'fade'
  2. Set pagination to true

Fix is included in the JS fiddle

textslider.on("mounted", () => {
  if (textslider.length === 1) {
    textslider.options = {
      pagination: false
    }
  }
});

Expected Behaviour

Hide the single dot