mxck / react-native-material-menu

Pure JavaScript material menu component for React Native
MIT License
512 stars 91 forks source link

On FlatList does not appears on exact point #102

Open gauravsbagul opened 3 years ago

gauravsbagul commented 3 years ago

Hey guys I am trying to open Menu on more options on my list of cards on FlatList. But the menu is appearing on the left side of the card and not beside the more icon. Can you please help me with this?

Screenshot 2021-01-15 at 12 46 48 PM
rajkhan91 commented 3 years ago

Hey guys I am trying to open Menu on more options on my list of cards on FlatList. But the menu is appearing on the left side of the card and not beside the more icon. Can you please help me with this?

Screenshot 2021-01-15 at 12 46 48 PM

I am facing same issue have you find any solution ?

gauravsbagul commented 3 years ago

@rajkhan91 hi, I have used transform to move the menu options to the right. or you can also use Menu from 'react-native-paper'

rajkhan91 commented 3 years ago

@gauravsbagul use Animated.FlatList instead of FlatList than this problem is solved, there is no need to write any css.

nilofardiwangroovy commented 4 months ago

You can use map method instead of the Flatlist as well also if you are use flat list then render new component under the flatlist renderItem and into this component create new only card or view component and pass Flatlist item in the renderItem component and into there pass this props in only view component and problem has been solved!

pavelustenko commented 3 months ago

@nilofardiwangroovy Could you share a minimal code example for flatlist solution, please?