Skip to content

Carousel - fix counter flickering between numbers #1591

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

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

M-i-k-e-l
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l commented Oct 7, 2021

Description

Carousel - fix counter flickering between numbers.
Use currentStandingPage instead of currentPage + a little typescript adjustment.
Please note that this will cause the counter to change on actual page change, and not mid change (approved for testing by UX).

Changelog

Carousel - fix counter flickering between numbers.

@M-i-k-e-l M-i-k-e-l requested a review from Inbal-Tish October 7, 2021 13:00
@M-i-k-e-l M-i-k-e-l marked this pull request as draft October 7, 2021 14:58
@M-i-k-e-l M-i-k-e-l marked this pull request as ready for review October 10, 2021 06:07
@@ -56,7 +56,7 @@ class Carousel extends Component<CarouselProps, CarouselState> {
containerWidth: undefined,
// @ts-ignore (defaultProps)
currentPage: this.shouldUsePageWidth() ? this.getCalcIndex(props.initialPage) : props.initialPage,
currentStandingPage: props.initialPage,
currentStandingPage: props.initialPage || 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'initialPage' prop's default value is already 0

@Inbal-Tish Inbal-Tish merged commit abad74f into master Oct 11, 2021
@M-i-k-e-l M-i-k-e-l deleted the fix/counter-flicker-between-numbers branch October 11, 2021 08:26
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.

2 participants