-
-
Notifications
You must be signed in to change notification settings - Fork 344
[4.0.2] Changing Carousel width dynamically with useWindowDimensions has inconsistent behavior #793
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
Comments
Hey there, @sambouchard-newforma! 👋 I'm here to help you out with any bugs, questions, or contributions you might have. Let's squash those bugs together! To address the issue where the carousel width does not update correctly when changing device orientation using
To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
@dosu I cant use the hook Wrapping in a view with the height prop in its style does nothing Putting the |
The As a workaround, you might want to try manually managing the overscroll behavior by adjusting the carousel's boundaries or using additional logic to limit the scroll position. This could involve using the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have a carousel that need to take the whole width of the device. I use
width
from the hookuseWindowDimensons
as the carousel width. When changing the orientation(and naturally, changing the width) the Carousel width revert to the width of only one item instead of the width of the screen. Even going back to the original orientation, the width is not the same as it was in the beginning.To Reproduce
Here is a snack with the bug : https://snack.expo.dev/@samuelbouchard/carousel-bug-4-0-2
Steps to reproduce the behavior:
Expected behavior
The width should follow the value we give in the
styles.width
props of the carousel. If the width change, the carousel should changeScreenshots
Versions (please complete the following information):
Smartphone (please complete the following information):
Happens on all evices
The text was updated successfully, but these errors were encountered: