-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Description
"react-native": "0.71.3",
"react": "18.2.0",
"react-native-sortable-grid": "^2.0.0",
<SortableGrid
itemsPerRow={3}
style={{
marginHorizontal: 20,
}}
>
{userImages.map((item, index) => {
return index === 0 ? (
<View style={style.imageView} key={"key-index-upload-photo"}>
<TouchableOpacity
onPress={() => setIsVisible(true)}
style={style.button}
>
<Subtract />
</TouchableOpacity>
</View>
) : (
<Pressable
key={index}
onPress={() => {
Alert.alert("Pressed!");
return 10;
}}
>
<View
style={{
width: 90,
height: 90,
// backgroundColor: "red",
padding: 10,
}}
>
<Image
style={{
width: "100%",
height: "100%",
}}
source={{
uri: item.pic,
}}
/>
</View>
</Pressable>
);
})}
</SortableGrid>
XRecorder_20032023_105303.mp4
I want to use sorting grid element and also want to open some alert or modal while pressed that element. But currently If I render element inside Pressable/TouchableOpacity then sorting feature is not working.
Metadata
Metadata
Assignees
Labels
No labels