-
Notifications
You must be signed in to change notification settings - Fork 30
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
Carousels: Optimise updating button state #12923
Conversation
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
aab6e00
to
1219fe6
Compare
Size Change: +306 B (+0.03%) Total Size: 958 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! We might want to add a helper function in lib
for the throttle function in the future if we have a third usage of it ⚡
Yeah, I wasn't sure whether to add it as a helper function in this PR, although it might need some config to make it more generic. Now that I think about it, |
Seen on PROD (merged by @jamesmockett 9 minutes and 56 seconds ago) Please check your changes! |
What does this change?
ScrollableCarousel
andSlideshowCarousel
.Why?
This ensures the button state correctly reflects the carousel's scroll position, and we're not unnecessarily processing events as the carousel is scrolled.
Screenshots