react-native-modal-dropdown icon indicating copy to clipboard operation
react-native-modal-dropdown copied to clipboard

How I can put the renderRightComponent at the end of the ModalDropdown

Open ssantamariaArkkosoft opened this issue 3 years ago • 3 comments

When I add the renderRightComponent for the icon, it shows like this:

Screen Shot 2021-03-04 at 20 14 54

But, I need it to show like this:

Screen Shot 2021-03-04 at 20 16 20

Checking the code of the ModalDropdown.js I found that I need to modify the "styles.button" to add "justifyContent: 'space-between'". Can you add one option to modify the view style "View style={styles.button}"?

One solution I found was to add 90% width to the textStyle, but I think it would be more helpful if I could modify the view style.

Thanks.

ssantamariaArkkosoft avatar Mar 05 '21 03:03 ssantamariaArkkosoft

You saved my life with this solution :D Never tought about it!!!

Tmsolutions avatar Mar 26 '21 21:03 Tmsolutions

I had the same issue, I added a patch in my library. I am going to make a PR for future references

oehc123 avatar Apr 17 '21 16:04 oehc123

When I add the renderRightComponent for the icon, it shows like this:

Screen Shot 2021-03-04 at 20 14 54

But, I need it to show like this:

Screen Shot 2021-03-04 at 20 16 20

Checking the code of the ModalDropdown.js I found that I need to modify the "styles.button" to add "justifyContent: 'space-between'". Can you add one option to modify the view style "View style={styles.button}"?

One solution I found was to add 90% width to the textStyle, but I think it would be more helpful if I could modify the view style.

Thanks.

flex: 1 to text styles works too. Thanks

Sargnec avatar Jan 12 '22 16:01 Sargnec