react-native-enhanced-popup-menu icon indicating copy to clipboard operation
react-native-enhanced-popup-menu copied to clipboard

How to create right to left menu animation

Open jsaa opened this issue 5 years ago • 3 comments

I'm trying to create a top right popup menu. But the menu pops left to right. I would like it to pop right to left. How can I do that?

jsaa avatar Sep 14 '19 03:09 jsaa

Looks like it is not supported right now. But I'm going to add support for this feature soon.

likern avatar Sep 14 '19 07:09 likern

How did you do the "Top right" popup menu in this demo? Hardcoded? Because that's exactly what I want to do.

68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f336f76396a55765148345538324a474e52432f67697068792e676966

jsaa avatar Sep 14 '19 12:09 jsaa

@jsaa Unfortunately, now this works automatically. Doesn't matter how you position your menu - it's not allowed to be outside of screen, even partially. If this is detected - menu automatically reversed to be fully visible on the screen.

So, to do that - the width of menu items should be wider that distance between component and right screen border.

If this is not your case - you can try https://github.com/mxck/react-native-material-menu, where as far as I know, were recently added right-to-left animation support.

likern avatar Sep 14 '19 13:09 likern