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 issue #1171 - slide alignment issue #1174

Merged
merged 1 commit into from
Apr 8, 2020
Merged

fix issue #1171 - slide alignment issue #1174

merged 1 commit into from
Apr 8, 2020

Conversation

samparmenter
Copy link
Contributor

Fix issue #1171 and maybe more

Slider doesn't calculate offsets correctly when slider isn't full screen because when componentDidUpdate is called and updates the state based on an initState call it uses the return from Dimensions.get('window') instead of the value from props if there is one. The value that should be used is calculated just before the incorrect value is used.

Bug was evident if you created a slider with a height and width different to the values of Dimensions.get('window'). On initial render it displayed correctly but on swiping you would end up with offsets depending on the difference between props.height/props.width and the values coming from Dimensions.get('window')

This fixes that

Slider doesn't calculate offsets correctly when slider isn't full screen because when componentDidUpdate is called and updates the state based on an initState call it uses the return from Dimensions.get('window') instead of the value from props if there is one. The value that should be used is calculated just before the incorrect value is used.
@ArrayZoneYour
Copy link
Collaborator

LGTM

@LackoDan
Copy link

Thanks for the fix, works great for me. Any idea on when the build issue might be fixed and the next release might be available?

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

Successfully merging this pull request may close these issues.

Bug while rendering Swiper NOT in full screen width and dynamic data
3 participants