-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Correctly select options when nested inside an optgroup #6442
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
selectParent = selectParent._nativeParent; | ||
} | ||
|
||
if (selectParent._tag === 'select') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a null check here, because selectParent could be null at this point, right?
This looks good to me, just a couple easy changes requested. |
@trevorsmith updated the pull request. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@zpao This fixes a regression, it would be good to get it into 15.0.1 if possible/practical. |
Correctly select options when nested inside an optgroup (cherry picked from commit 5ac51c3)
I took a stab at fixing #6440. As far as I can tell,
<option>
can't have any native parents other than<optgroup>
or<select>
. If this isn't the case, would we want to crawl up through the chain of parents looking for<select>
or would it be better to rely on context again like the older implementation?