diff --git a/app/src/main/java/com/aiosman/riderpro/ui/composables/DragAndDrop.kt b/app/src/main/java/com/aiosman/riderpro/ui/composables/DragAndDrop.kt index 9551ccf..aa41065 100644 --- a/app/src/main/java/com/aiosman/riderpro/ui/composables/DragAndDrop.kt +++ b/app/src/main/java/com/aiosman/riderpro/ui/composables/DragAndDrop.kt @@ -39,6 +39,7 @@ import androidx.compose.ui.zIndex import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.launch +import java.util.UUID @OptIn(ExperimentalFoundationApi::class) @@ -65,7 +66,7 @@ fun DraggableGrid( horizontalArrangement = Arrangement.spacedBy(16.dp), ) { - itemsIndexed(items, key = { _, item -> item }) { index, item -> + itemsIndexed(items, key = { _, item -> "${item}-${UUID.randomUUID()}" }) { index, item -> DraggableItem(dragDropState, index) { isDragging -> content(item, isDragging) }