-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[RN 0.36.0] onLayout is returning 0 for view drawn in NavigationCardStack #10743
Comments
returns 100. It seems to be ignoring children in the size computation. |
cc @ericvicenti |
There have been quite a few changes to the layout implementation, perhaps the root cause is somewhere in there? cc @emilsjolander |
Is this iOS or Android @robclouth? Does adding |
I faced the same issue,
|
Fixed!!! |
Maybe the change in layout behavior means we need to change the |
@darkamenosa that's not the same issue. My component has the correct height when rendered, but onLayout reports a height of 0. |
Ok super weird, if I don't render the header onLayout in the children returns the correct height. |
Nope spoke too soon. I have listerally no ideas what's happening. Something has changed in either the layout code, NavigationCardStack or something and it's broken my code. Probably not a RN bug. I'll figure it out eventually. |
Got it: if I set the component rendered in |
@emilsjolander has been working on evolving RN's layout system, and might know more about this. Was this an intentional breaking change, or is it a bug? |
Yup, some layout stuff relating to ScrollViews and flex is listed as a breaking change in the release notes. I just couldn't figure out how this was related since I wasn't using either. I've resolved this on my end now and don't have time right now to look into it deeper, so I can close if you wanna clean up that ever growing issues list... |
Thanks! |
0a9b6be (I'm guessing) has caused
onLayout
to return 0 for views returned inrenderScene
in aNavigationCardStack
.This prints 0. In 0.35.0 it prints 100. Using
onLayout
insideNavigationCardStack
is important for iOS style dynamically resizing settings popovers.What's happening here?
The text was updated successfully, but these errors were encountered: