splide icon indicating copy to clipboard operation
splide copied to clipboard

Single item pagination not hidden on type "fade"

Open despecial opened this issue 1 year ago • 0 comments

Checks

  • [X] Not a duplicate.
  • [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions

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

despecial avatar Jun 19 '23 13:06 despecial