-
Notifications
You must be signed in to change notification settings - Fork 492
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
Add Icon
prop to component
#105
Add Icon
prop to component
#105
Conversation
8ea24de
to
752ed30
Compare
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.
could you fix the merge conflicts -- renderIcon works with both ios/android due to the new flag added in 5.1, so if you could update the testIDs accordingly too I would appreciate it--- thanks
src/index.js
Outdated
@@ -416,6 +423,7 @@ export default class RNPickerSelect extends PureComponent { | |||
> | |||
{this.renderPickerItems()} | |||
</Picker> | |||
{Icon && this.renderIcon()} |
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.
not a fan of this syntax personally -- would prefer:
{Icon ? this.renderIcon() : null}
e397da3
to
ae333fb
Compare
- Adding the possibility of the user passing a custom `Icon` prop to be rendered instead of the default one - Added README.md instructions - Add tests for the new behaviour - Change testID keys to not mindd about platforms anymore - Refactored renderAndroid because of `Cognitive Complexity` issue on code climate
ae333fb
to
ce056cc
Compare
Can you share some sample code of this working as intended on ios and android? Ideally on snack.expo.io |
Any plan to get this merged? Since @luizParreira already did the testing, adding one picker using the new prop in the |
I tested it myself locally and it wasn’t working as I imagine it should - which is why I’m asking for working examples |
I see, makes sense 👍 |
Going to close this out as I haven't heard from you in a couple months. We can re-open later. |
Icon
prop to berendered instead of the default one
Closes #104