-
Notifications
You must be signed in to change notification settings - Fork 1.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
If the measure function is defined: only return from execution of lay… #84
Conversation
…outNode, when the node has no children.
If the measure function is defined: only return from execution of lay…
Thanks, that makes sense! I can't wait to see your TextView code. I've always wanted to be able to put arbitrary elements there but couldn't find time to implement it! |
@lukasreichart Just like you use this for a Not sure how to add support to use |
@paramaggarwal sounds great and I'd love to try it. 👍 Have you published a npm module or created a PR for react-native? |
@lukasreichart Unfortunately your change here hasn't ended up in RN yet... Open PR: facebook/react-native#1776 I have a generic implementation for all RCTView subclasses here: facebook/react-native#1538 - simply pass an The PR is blocked at the moment as |
…outNode, when the node has no children.
I'am currently working on a new implementation of the TextView element in react-native.
My implementation uses the node->measure function to calculate the height of the element, but a TextView may also have subviews. If thats the case it's necessary to execute the rest of the layoutNode function and not stopping it after line 318.
This change does not affect the behaviour of the other module ( RCText ), that uses the measure function, because this element will always have a children_count of zero.