-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
[v4] | [v2] BottomSheet interferes with onLayout calculations of its child components #1776
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
You can use |
Thanks for your response, however in my experience |
onLayout will be called multiple times, I think it's expected, because you are changing the size of the modal after it renders. |
Bug
Apologies in advance if this is intended behaviour.
In my project, I wish to dynamically calculate snap points based on the height of certain 'content sections' that are rendered in the Bottom Sheet. e.g.
The button height and view height are then used to create the snapPoints array.
Essentially I am trying to achieve something similar to what this issue requests: #1024, until v5 introduces this functionality! :)
However I noticed that wrapping my
View
in theBottomSheet
seems to causeonLayout
functions to be called multiple times with different increasing values, sometimes it eventually settles on the correct value but not always. I saw this from console logging inside theonLayout
functions. This causes inconsistent UI due to thesnapPoints
being inconsistent / not getting the correct values.Environment info
Steps To Reproduce
onLayout
prop,Describe what you expected to happen:
Reproducible sample code
See above
The text was updated successfully, but these errors were encountered: