Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate itemsToShow Configuration #436

Closed
ismail9k opened this issue Dec 2, 2024 · 0 comments · Fixed by #461
Closed

Validate itemsToShow Configuration #436

ismail9k opened this issue Dec 2, 2024 · 0 comments · Fixed by #461
Labels
🌟 feature request New feature or request

Comments

@ismail9k
Copy link
Owner

ismail9k commented Dec 2, 2024

The itemsToShow option in vue3-carousel should be validated to ensure it falls within a reasonable range. Currently, it allows invalid values, which can break the carousel.

Expected Behavior

  • itemsToShow should satisfy: 1 <= itemsToShow <= slidesCount
  • If itemsToShow is less than 1, it should default to 1.
  • If it exceeds slidesCount, it should default to slidesCount.

Steps to Reproduce

  1. Set itemsToShow to a value less than 1 or greater than slidesCount.
  2. Observe the broken or unintended behavior.

Proposed Solution

  • Add validation logic to enforce 1 <= itemsToShow <= slidesCount.
  • Update documentation to reflect this rule.

Priority

Medium – Improves stability and prevents misuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant