Add Icon Right to unexpanded field
Before the dropdown is expanded we should be able to give it an icon on the right hand side. For example, a down facing chevron from vector icons. That would be great, thanks!
I would like this feature as well, if I have time, I will try to work on it and send a PR. This package is great, but it misses couple of stuff to make it even better.
Try this https://github.com/Kishanjvaghela/react-native-modal-dropdown
Added support for renderRightComponent.
Now you can render anything in right side including icon as well.
<ModalDropdown
isFullWidth
textStyle={{ flex: 1 }}
renderRightComponent={() => (
<Image />
)}
{...rest} />
it looks like the latest version does not have renderRightComponent nor renderButtonComponent in its props. When I use it, it works but I get typescript error:
Property 'renderRightComponent' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ModalDropdown
Is this by design?
Try this https://github.com/Kishanjvaghela/react-native-modal-dropdown
Added support for
renderRightComponent.Now you can render anything in right side including icon as well.
<ModalDropdown isFullWidth textStyle={{ flex: 1 }} renderRightComponent={() => ( <Image /> )} {...rest} />
How can we change the icon like chevron facing up when dropdown is opened and facing down when it's not? Is there any prop for that?