Reputation: 669
I have a FlatList and each item uses the react-native-popup-menu functionality to show a popup menu when clicked. However, only the top of the menu appears and the rest is hidden behind the following list items. Is there a way to have the menu appear atop the entire FlatList? Thank you.
Upvotes: 1
Views: 906
Reputation: 47
with FlatList use
CellRendererComponent={({children, style, ...props}) => {
const zIndexStyle = {
zIndex: selectedItem ? 10 : -1,
};
return (
<View style={[style, zIndexStyle]} {...props}>
{children}
</View>
);
}}
for further details lookout this issue with Flatlist on github:react-native-issue
Upvotes: 0