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

fix(Carousel): next and prev buttons disabled #1619

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

kshitijsubedi
Copy link
Contributor

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR address the bug where Ucarousel's next and previous button are disabled and won't change unless slide are moved manually.

Issue seems to be that useScroll's arrivedState value of left and right are true at setup and doesn't recalculate unless slide moves. This fix changes the isFirst and isLast logic to calculate according to the currentPage state.

Issue Screenshots

CleanShot 2024-04-05 at 9β€― 37 49

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@benjamincanac benjamincanac merged commit e909884 into nuxt:dev Apr 5, 2024
2 checks passed
@benjamincanac
Copy link
Member

Thanks! 😊

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

Successfully merging this pull request may close these issues.

None yet

2 participants