siemiatj / react-native-modal-dropdown

Fork of the original https://github.com/sohobloo/react-native-modal-dropdown
MIT License
118 stars 98 forks source link

Please add Dropdown Icon on right default value #11

Open TruongNguyen95 opened 3 years ago

TruongNguyen95 commented 3 years ago

Please add Dropdown Icon on right default value, thanks you :D

donni106 commented 3 years ago

Why do you think a default icon could be the right decision for this package? Which icon would you prefer? I cannot think of an icon that could fit every case for anybody. The current way is to pass an icon if you want one. You can use the renderRightComponent prop, which will be rendered where you expect it. https://github.com/siemiatj/react-native-modal-dropdown/blob/619ca1aaeb5fb100d34f2598eca38f532777285a/components/ModalDropdown.js#L232-L237

The default is an empty View https://github.com/siemiatj/react-native-modal-dropdown/blob/619ca1aaeb5fb100d34f2598eca38f532777285a/components/ModalDropdown.js#L106

https://github.com/siemiatj/react-native-modal-dropdown/blob/619ca1aaeb5fb100d34f2598eca38f532777285a/components/ModalDropdown.js#L220